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
<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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Copyright © 2017 SAP SE. All rights reserved.