Interface StructuredCollection
- All Known Implementing Classes:
StructuredInnerList,StructuredList
public interface StructuredCollection
Shared interface for
StructuredInnerList and StructuredList.
Contains methods for converting structured lists to Java List containing Java plain objects.-
Method Summary
Modifier and TypeMethodDescriptiondefault List<BigDecimal>Returns values of Structured Items in this Structured List converted toBigDecimalobjects.boolList()Returns values of Structured Items in this Structured List converted toBooleanobjects.default List<byte[]>Returns values of Structured Items in this Structured List converted to byte[] objects.Returns values of Structured Items in this Structured List converted toDoubleobjects.intList()Returns values of Structured Items in this Structured List converted toIntegerobjects.default booleanisEmpty()Returns true if this list contains no elements<T extends StructuredItem>
List<T>itemList()ReturnsListof Structured Items stored in this Structured Listdefault <T extends StructuredItem>
List<T>ReturnsListof Structured Items stored in this Structured List.longList()Returns values of Structured Items in this Structured List converted toLongobjects.Returns values of Structured Items in this Structured List converted toStringobjects.
-
Method Details
-
itemList
ReturnsListof Structured Items stored in this Structured List- Type Parameters:
T- Specific Item class if needed. No type check is performed, only simple casting.- Returns:
- Underlying list of
StructuredItemobjects
-
itemList
ReturnsListof Structured Items stored in this Structured List.Similar to
itemList(), but class of list members is provided as method argument rather than "generic type argument", e.g.myList.itemList(StructuredInteger.class)instead ofmyList.<StructuredInteger>itemList().- Type Parameters:
T- Type of list members- Parameters:
itemClass- Class of list members. No type check is performed, only simple casting.- Returns:
- Underlying list of
StructuredItemobjects
-
isEmpty
default boolean isEmpty()Returns true if this list contains no elements- Returns:
- True if list contains no elements
-
stringList
Returns values of Structured Items in this Structured List converted toStringobjects.- Returns:
- List of item values converted to String
- See Also:
-
boolList
Returns values of Structured Items in this Structured List converted toBooleanobjects. This Structured List must containStructuredBooleanmembers only.- Returns:
- List of item values converted to Boolean
- Throws:
UnsupportedOperationException- Thrown if this list contains non-StructuredBooleanmembers.
-
intList
Returns values of Structured Items in this Structured List converted toIntegerobjects. This Structured List must containStructuredIntegermembers only.(int) cast is used internally, which means that returned value will be wrong for item values smaller than
Integer.MIN_VALUEor grater thanInteger.MAX_VALUE.- Returns:
- List of item values converted to Integer
- Throws:
UnsupportedOperationException- Thrown if this list contains non-StructuredIntegermembers
-
longList
Returns values of Structured Items in this Structured List converted toLongobjects. This Structured List must containStructuredIntegermembers only.- Returns:
- List of item values converted to Long
- Throws:
UnsupportedOperationException- Thrown if this list contains non-StructuredIntegermembers
-
bigDecimalList
Returns values of Structured Items in this Structured List converted toBigDecimalobjects. This Structured List must containStructuredDecimalorStructuredIntegermembers only.- Returns:
- List of item values converted to BigDecimal
- Throws:
UnsupportedOperationException- Thrown if this list contains a member which is neitherStructuredDecimalnorStructuredInteger
-
doubleList
Returns values of Structured Items in this Structured List converted toDoubleobjects. This Structured List must containStructuredDecimalorStructuredIntegermembers only.- Returns:
- List of item values converted to Double
- Throws:
UnsupportedOperationException- Thrown if this list contains non-StructuredDecimalor non-StructuredIntegermembers.
-
bytesList
Returns values of Structured Items in this Structured List converted to byte[] objects. This Structured List must containStructuredBytesmembers only.- Returns:
- List of item values converted to byte[]
- Throws:
UnsupportedOperationException- Thrown if this list contains non-StructuredBytesmembers.
-