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 toBigDecimal
objects.boolList()
Returns values of Structured Items in this Structured List converted toBoolean
objects.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 toDouble
objects.intList()
Returns values of Structured Items in this Structured List converted toInteger
objects.default boolean
isEmpty()
Returns true if this list contains no elements<T extends StructuredItem>
List<T>itemList()
ReturnsList
of Structured Items stored in this Structured Listdefault <T extends StructuredItem>
List<T>ReturnsList
of Structured Items stored in this Structured List.longList()
Returns values of Structured Items in this Structured List converted toLong
objects.Returns values of Structured Items in this Structured List converted toString
objects.
-
Method Details
-
itemList
ReturnsList
of 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
StructuredItem
objects
-
itemList
ReturnsList
of 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
StructuredItem
objects
-
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 toString
objects.- Returns:
- List of item values converted to String
- See Also:
-
boolList
Returns values of Structured Items in this Structured List converted toBoolean
objects. This Structured List must containStructuredBoolean
members only.- Returns:
- List of item values converted to Boolean
- Throws:
UnsupportedOperationException
- Thrown if this list contains non-StructuredBoolean
members.
-
intList
Returns values of Structured Items in this Structured List converted toInteger
objects. This Structured List must containStructuredInteger
members only.(int) cast is used internally, which means that returned value will be wrong for item values smaller than
Integer.MIN_VALUE
or grater thanInteger.MAX_VALUE
.- Returns:
- List of item values converted to Integer
- Throws:
UnsupportedOperationException
- Thrown if this list contains non-StructuredInteger
members
-
longList
Returns values of Structured Items in this Structured List converted toLong
objects. This Structured List must containStructuredInteger
members only.- Returns:
- List of item values converted to Long
- Throws:
UnsupportedOperationException
- Thrown if this list contains non-StructuredInteger
members
-
bigDecimalList
Returns values of Structured Items in this Structured List converted toBigDecimal
objects. This Structured List must containStructuredDecimal
orStructuredInteger
members only.- Returns:
- List of item values converted to BigDecimal
- Throws:
UnsupportedOperationException
- Thrown if this list contains a member which is neitherStructuredDecimal
norStructuredInteger
-
doubleList
Returns values of Structured Items in this Structured List converted toDouble
objects. This Structured List must containStructuredDecimal
orStructuredInteger
members only.- Returns:
- List of item values converted to Double
- Throws:
UnsupportedOperationException
- Thrown if this list contains non-StructuredDecimal
or non-StructuredInteger
members.
-
bytesList
Returns values of Structured Items in this Structured List converted to byte[] objects. This Structured List must containStructuredBytes
members only.- Returns:
- List of item values converted to byte[]
- Throws:
UnsupportedOperationException
- Thrown if this list contains non-StructuredBytes
members.
-