public interface ResultCollection extends ResultElement, Iterable<ResultElement>
Use the method collect(String)
to collect elements inside this object as CollectedResultCollection
identified by a certain name.
Use the method asList(Class)
to cast this collection into a list of instances of a certain class type.
Use the method asSet(Class)
to cast this collection into a set of instances of a certain class type.
To cast this collection into a set or list of built-in data and object types, use methods such as
asStringList()
or asStringSet()
.
Modifier and Type | Method and Description |
---|---|
List<BigDecimal> |
asBigDecimalList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as BigDecimal . |
Set<BigDecimal> |
asBigDecimalSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as BigDecimal . |
List<BigInteger> |
asBigIntegerList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as BigInteger . |
Set<BigInteger> |
asBigIntegerSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as BigInteger . |
List<Boolean> |
asBooleanList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Boolean . |
Set<Boolean> |
asBooleanSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Boolean . |
List<Byte> |
asByteList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Byte . |
Set<Byte> |
asByteSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Byte . |
List<Character> |
asCharacterList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Character . |
Set<Character> |
asCharacterSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Character . |
List<Double> |
asDoubleList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Double . |
Set<Double> |
asDoubleSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Double . |
List<Float> |
asFloatList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Float . |
Set<Float> |
asFloatSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Float . |
List<Integer> |
asIntegerList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Integer . |
Set<Integer> |
asIntegerSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Integer . |
<T> List<T> |
asList(Class<T> objectType)
|
List<Long> |
asLongList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Long . |
Set<Long> |
asLongSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Long . |
<T> Set<T> |
asSet(Class<T> objectType)
|
List<Short> |
asShortList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as Short . |
Set<Short> |
asShortSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as Short . |
List<String> |
asStringList()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a List of all their values represented as String . |
Set<String> |
asStringSet()
Assuming all elements within this
ResultCollection are instances of ResultPrimitive , this method
returns a Set of all their values represented as String . |
CollectedResultCollection |
collect(String filterName)
Collects elements inside this
ResultCollection identified by filterName and returns a
CollectedResultCollection that contains only the collected elements. |
asBigDecimal, asBigInteger, asBoolean, asByte, asCharacter, asDouble, asFloat, asInteger, asLong, asShort, asString, getAsCollection, getAsObject, getAsPrimitive, isResultCollection, isResultObject, isResultPrimitive
forEach, iterator, spliterator
CollectedResultCollection collect(String filterName)
ResultCollection
identified by filterName
and returns a
CollectedResultCollection
that contains only the collected elements.filterName
- The name used to identify the items to collectCollectedResultCollection
that contains only the collected elements.<T> List<T> asList(Class<T> objectType) throws UnsupportedOperationException
T
- The type the elements in this collection object shall be casted toobjectType
- The Class
type of the type T
List
of all elements within this ResultCollection
casted into class type T
.UnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to T
.<T> Set<T> asSet(Class<T> objectType) throws UnsupportedOperationException
T
- The type the elements in this collection object shall be casted toobjectType
- The Class
type of the type T
Set
of all elements within this ResultCollection
casted into class type T
.UnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to T
.List<Boolean> asBooleanList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Boolean
.List
of Boolean
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Boolean
.Set<Boolean> asBooleanSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Boolean
.Set
of Boolean
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Boolean
.List<Byte> asByteList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Byte
.List
of Byte
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Byte
.Set<Byte> asByteSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Byte
.Set
of Byte
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Byte
.List<Character> asCharacterList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Character
.List
of Character
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Character
.Set<Character> asCharacterSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Character
.Set
of Character
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Character
.List<String> asStringList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as String
.List
of String
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to String
.Set<String> asStringSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as String
.Set
of String
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to String
.List<Integer> asIntegerList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Integer
.List
of Integer
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Integer
.Set<Integer> asIntegerSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Integer
.Set
of Integer
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Integer
.List<Short> asShortList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Short
.List
of Short
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Short
.Set<Short> asShortSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Short
.Set
of Short
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Short
.List<Long> asLongList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Long
.List
of Long
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Long
.Set<Long> asLongSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Long
.Set
of Long
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Long
.List<Float> asFloatList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Float
.List
of Float
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Float
.Set<Float> asFloatSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Float
.Set
of Float
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Float
.List<Double> asDoubleList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as Double
.List
of Double
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to Double
.Set<Double> asDoubleSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as Double
.Set
of Double
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to Double
.List<BigInteger> asBigIntegerList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as BigInteger
.List
of BigInteger
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to BigInteger
.Set<BigInteger> asBigIntegerSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as BigInteger
.Set
of BigInteger
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to BigInteger
.List<BigDecimal> asBigDecimalList() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a List
of all their values represented as BigDecimal
.List
of BigDecimal
objectsUnsupportedOperationException
- If this class does not support the creation of a List
or at least one element could not be
cast to BigDecimal
.Set<BigDecimal> asBigDecimalSet() throws UnsupportedOperationException
ResultCollection
are instances of ResultPrimitive
, this method
returns a Set
of all their values represented as BigDecimal
.Set
of BigDecimal
objectsUnsupportedOperationException
- If this class does not support the creation of a Set
or at least one element could not be
cast to BigDecimal
.Copyright © 2018 SAP SE. All rights reserved.