Package com.sap.cloud.sdk.result
Class DefaultCollectedResultCollection
java.lang.Object
com.sap.cloud.sdk.result.DefaultCollectedResultCollection
- All Implemented Interfaces:
CollectedResultCollection
Default implementation of the
CollectedResultCollection interface, allowing strongly typed access to specific
fields annotated with ElementName in elements of a ResultCollection.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultCollectedResultCollection(String collectedElementName, Iterable<ResultElement> resultElements) Creates a newDefaultCollectedResultCollectioninstance. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.<T> List<T>Returns a list of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.<T> Set<T>Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.Returns a list of values from this instance.Returns a set of values from this instance.protected booleanbooleanThe common name of all elements addressed by this collection.inthashCode()iterator()Returns an iterator over the elements of this collection.toString()
-
Constructor Details
-
DefaultCollectedResultCollection
public DefaultCollectedResultCollection(String collectedElementName, Iterable<ResultElement> resultElements) Creates a newDefaultCollectedResultCollectioninstance.- Parameters:
collectedElementName- The common name of all elements addressed by this collection.resultElements-
-
-
Method Details
-
asList
@Nonnull public <T> List<T> asList(@Nonnull Class<T> objectType) throws UnsupportedOperationException Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented as an object of the given type.Important: In order to deserialize a result element to an object of a given type, you have to annotate all relevant field members of the respective class with
ElementName. For example:class MyObject { @ElementName( "MANDT" ) SapClient sapClient; }- Specified by:
asListin interfaceCollectedResultCollection- Type Parameters:
T- The type into which the values should be converted.- Parameters:
objectType- Class object of the type into which the values should be converted.- Returns:
- The list of values as objects of type
T. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented as an object of the given type.Important: In order to deserialize a result element to an object of a given type, you have to annotate all relevant field members of the respective class with
ElementName. For example:class MyObject { @ElementName( "MANDT" ) SapClient sapClient; }- Specified by:
asSetin interfaceCollectedResultCollection- Type Parameters:
T- The type into which the values should be converted.- Parameters:
objectType- Class object of the type into which the values should be converted.- Returns:
- The set of values as objects of type
T. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBooleanList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asBoolean.- Specified by:
asBooleanListin interfaceCollectedResultCollection- Returns:
- The list of values as
Boolean. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBooleanSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asBoolean.- Specified by:
asBooleanSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Boolean. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asByteList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asByte.- Specified by:
asByteListin interfaceCollectedResultCollection- Returns:
- The list of values as
Byte. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asByteSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asByte.- Specified by:
asByteSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Byte. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asCharacterList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asCharacter.- Specified by:
asCharacterListin interfaceCollectedResultCollection- Returns:
- The list of values as
Character. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asCharacterSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asCharacter.- Specified by:
asCharacterSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Character. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asStringList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asString.- Specified by:
asStringListin interfaceCollectedResultCollection- Returns:
- The list of values as
String. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asStringSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asString.- Specified by:
asStringSetin interfaceCollectedResultCollection- Returns:
- The set of values as
String. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asIntegerList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asInteger.- Specified by:
asIntegerListin interfaceCollectedResultCollection- Returns:
- The list of values as
Integer. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asIntegerSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asInteger.- Specified by:
asIntegerSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Integer. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asShortList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asShort.- Specified by:
asShortListin interfaceCollectedResultCollection- Returns:
- The list of values as
Short. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asShortSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asShort.- Specified by:
asShortSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Short. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asLongList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asLong.- Specified by:
asLongListin interfaceCollectedResultCollection- Returns:
- The list of values as
Long. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asLongSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asLong.- Specified by:
asLongSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Long. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asFloatList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asFloat.- Specified by:
asFloatListin interfaceCollectedResultCollection- Returns:
- The list of values as
Float. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asFloatSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asFloat.- Specified by:
asFloatSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Float. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asDoubleList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asDouble.- Specified by:
asDoubleListin interfaceCollectedResultCollection- Returns:
- The list of values as
Double. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asDoubleSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asDouble.- Specified by:
asDoubleSetin interfaceCollectedResultCollection- Returns:
- The set of values as
Double. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBigIntegerList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asBigInteger.- Specified by:
asBigIntegerListin interfaceCollectedResultCollection- Returns:
- The list of values as
BigInteger. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBigIntegerSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asBigInteger.- Specified by:
asBigIntegerSetin interfaceCollectedResultCollection- Returns:
- The set of values as
BigInteger. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBigDecimalList
Description copied from interface:CollectedResultCollectionReturns a list of values from this instance. The values are represented asBigDecimal.- Specified by:
asBigDecimalListin interfaceCollectedResultCollection- Returns:
- The list of values as
BigDecimal. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
asBigDecimalSet
Description copied from interface:CollectedResultCollectionReturns a set of values from this instance. The values are represented asBigDecimal.- Specified by:
asBigDecimalSetin interfaceCollectedResultCollection- Returns:
- The set of values as
BigDecimal. - Throws:
UnsupportedOperationException- If the value could not be found or could not be converted to the given type.
-
iterator
Returns an iterator over the elements of this collection.- Returns:
- An iterator over the elements of this collection.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getCollectedElementName
The common name of all elements addressed by this collection. -
getResultElements
-