public class DefaultCollectedResultCollection extends Object implements CollectedResultCollection
CollectedResultCollection interface, allowing strongly typed access to specific
fields annotated with ElementName in elements of a ResultCollection.ResultCollection| Constructor and Description |
|---|
DefaultCollectedResultCollection(String collectedElementName,
Iterable<ResultElement> resultElements) |
| Modifier and Type | Method and Description |
|---|---|
List<BigDecimal> |
asBigDecimalList()
Returns a list of values from this instance.
|
Set<BigDecimal> |
asBigDecimalSet()
Returns a set of values from this instance.
|
List<BigInteger> |
asBigIntegerList()
Returns a list of values from this instance.
|
Set<BigInteger> |
asBigIntegerSet()
Returns a set of values from this instance.
|
List<Boolean> |
asBooleanList()
Returns a list of values from this instance.
|
Set<Boolean> |
asBooleanSet()
Returns a set of values from this instance.
|
List<Byte> |
asByteList()
Returns a list of values from this instance.
|
Set<Byte> |
asByteSet()
Returns a set of values from this instance.
|
List<Character> |
asCharacterList()
Returns a list of values from this instance.
|
Set<Character> |
asCharacterSet()
Returns a set of values from this instance.
|
List<Double> |
asDoubleList()
Returns a list of values from this instance.
|
Set<Double> |
asDoubleSet()
Returns a set of values from this instance.
|
List<Float> |
asFloatList()
Returns a list of values from this instance.
|
Set<Float> |
asFloatSet()
Returns a set of values from this instance.
|
List<Integer> |
asIntegerList()
Returns a list of values from this instance.
|
Set<Integer> |
asIntegerSet()
Returns a set of values from this instance.
|
<T> List<T> |
asList(Class<T> objectType)
Returns a list of values from this instance.
|
List<Long> |
asLongList()
Returns a list of values from this instance.
|
Set<Long> |
asLongSet()
Returns a set of values from this instance.
|
<T> Set<T> |
asSet(Class<T> objectType)
Returns a set of values from this instance.
|
List<Short> |
asShortList()
Returns a list of values from this instance.
|
Set<Short> |
asShortSet()
Returns a set of values from this instance.
|
List<String> |
asStringList()
Returns a list of values from this instance.
|
Set<String> |
asStringSet()
Returns a set of values from this instance.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getCollectedElementName()
The common name of all elements addressed by this collection.
|
Iterable<ResultElement> |
getResultElements() |
int |
hashCode() |
Iterator<ResultElement> |
iterator() |
String |
toString() |
public DefaultCollectedResultCollection(String collectedElementName, Iterable<ResultElement> resultElements)
@Nonnull public <T> List<T> asList(@Nonnull Class<T> objectType) throws UnsupportedOperationException
CollectedResultCollection
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;
}
asList in interface CollectedResultCollectionT - The type into which the values should be converted.objectType - Class object of the type into which the values should be converted.T.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public <T> Set<T> asSet(@Nonnull Class<T> objectType) throws UnsupportedOperationException
CollectedResultCollection
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;
}
asSet in interface CollectedResultCollectionT - The type into which the values should be converted.objectType - Class object of the type into which the values should be converted.T.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Boolean> asBooleanList() throws UnsupportedOperationException
CollectedResultCollectionBoolean.asBooleanList in interface CollectedResultCollectionBoolean.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Boolean> asBooleanSet() throws UnsupportedOperationException
CollectedResultCollectionBoolean.asBooleanSet in interface CollectedResultCollectionBoolean.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Byte> asByteList() throws UnsupportedOperationException
CollectedResultCollectionByte.asByteList in interface CollectedResultCollectionByte.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Byte> asByteSet() throws UnsupportedOperationException
CollectedResultCollectionByte.asByteSet in interface CollectedResultCollectionByte.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Character> asCharacterList() throws UnsupportedOperationException
CollectedResultCollectionCharacter.asCharacterList in interface CollectedResultCollectionCharacter.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Character> asCharacterSet() throws UnsupportedOperationException
CollectedResultCollectionCharacter.asCharacterSet in interface CollectedResultCollectionCharacter.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<String> asStringList() throws UnsupportedOperationException
CollectedResultCollectionString.asStringList in interface CollectedResultCollectionString.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<String> asStringSet() throws UnsupportedOperationException
CollectedResultCollectionString.asStringSet in interface CollectedResultCollectionString.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Integer> asIntegerList() throws UnsupportedOperationException
CollectedResultCollectionInteger.asIntegerList in interface CollectedResultCollectionInteger.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Integer> asIntegerSet() throws UnsupportedOperationException
CollectedResultCollectionInteger.asIntegerSet in interface CollectedResultCollectionInteger.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Short> asShortList() throws UnsupportedOperationException
CollectedResultCollectionShort.asShortList in interface CollectedResultCollectionShort.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Short> asShortSet() throws UnsupportedOperationException
CollectedResultCollectionShort.asShortSet in interface CollectedResultCollectionShort.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Long> asLongList() throws UnsupportedOperationException
CollectedResultCollectionLong.asLongList in interface CollectedResultCollectionLong.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Long> asLongSet() throws UnsupportedOperationException
CollectedResultCollectionLong.asLongSet in interface CollectedResultCollectionLong.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Float> asFloatList() throws UnsupportedOperationException
CollectedResultCollectionFloat.asFloatList in interface CollectedResultCollectionFloat.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Float> asFloatSet() throws UnsupportedOperationException
CollectedResultCollectionFloat.asFloatSet in interface CollectedResultCollectionFloat.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<Double> asDoubleList() throws UnsupportedOperationException
CollectedResultCollectionDouble.asDoubleList in interface CollectedResultCollectionDouble.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<Double> asDoubleSet() throws UnsupportedOperationException
CollectedResultCollectionDouble.asDoubleSet in interface CollectedResultCollectionDouble.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<BigInteger> asBigIntegerList() throws UnsupportedOperationException
CollectedResultCollectionBigInteger.asBigIntegerList in interface CollectedResultCollectionBigInteger.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<BigInteger> asBigIntegerSet() throws UnsupportedOperationException
CollectedResultCollectionBigInteger.asBigIntegerSet in interface CollectedResultCollectionBigInteger.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public List<BigDecimal> asBigDecimalList() throws UnsupportedOperationException
CollectedResultCollectionBigDecimal.asBigDecimalList in interface CollectedResultCollectionBigDecimal.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Set<BigDecimal> asBigDecimalSet() throws UnsupportedOperationException
CollectedResultCollectionBigDecimal.asBigDecimalSet in interface CollectedResultCollectionBigDecimal.UnsupportedOperationException - If the value could not be found or could not be converted to the given type.@Nonnull public Iterator<ResultElement> iterator()
public String getCollectedElementName()
public Iterable<ResultElement> getResultElements()
Copyright © 2021 SAP SE. All rights reserved.