Class StructuredInnerList
java.lang.Object
net.visma.autopay.http.structured.StructuredItem
net.visma.autopay.http.structured.StructuredInnerList
- All Implemented Interfaces:
StructuredCollection
,StructuredField
Class representing Structured Inner Lists
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the specified object with this Structured Item for equality.int
hashCode()
Returns hash code for this Structured Item.<T extends StructuredItem>
List<T>itemList()
ReturnsList
of Structured Items stored in this Structured Liststatic StructuredInnerList
Creates Structured Inner List from given objects, without parameters for the inner liststatic StructuredInnerList
of
(Collection<?> objects) Creates Structured Inner List from given Collection elements, without parameters for the inner liststatic StructuredInnerList
withParams
(Collection<?> objects, Map<String, ?> parameters) Creates Structured String of given object collection and parametersstatic StructuredInnerList
withParams
(Collection<?> objects, StructuredParameters parameters) Creates Structured String of given object collection and parametersMethods inherited from class net.visma.autopay.http.structured.StructuredItem
bigDecimalParam, boolParam, bytesParam, doubleParam, intParam, longParam, parameters, parse, serialize, stringParam, stringValue, toString
Methods inherited from interface net.visma.autopay.http.structured.StructuredCollection
bigDecimalList, boolList, bytesList, doubleList, intList, isEmpty, itemList, longList, stringList
-
Method Details
-
of
Creates Structured Inner List from given Collection elements, without parameters for the inner listProvided objects are converted to Structured Items without parameters or used directly if they are instances of
StructuredItem
. Strings are converted toStructuredString
. For tokens, useStructuredToken
. For detailed conversion rules seeStructuredList.of(Collection)
.- Parameters:
objects
- Objects to be converted toStructuredInnerList
items- Returns:
- Created Structured Inner List
- Throws:
IllegalArgumentException
- Invalid objects provided
-
of
Creates Structured Inner List from given objects, without parameters for the inner listProvided objects are converted to Structured Items without parameters or used directly if they are instances of
StructuredItem
. Strings are converted toStructuredString
. For tokens, useStructuredToken
. For detailed conversion rules seeStructuredList.of(Collection)
.- Parameters:
objects
- Objects to be converted toStructuredInnerList
items- Returns:
- Created Structured Inner List
- Throws:
IllegalArgumentException
- Invalid objects provided
-
withParams
Creates Structured String of given object collection and parameters- Parameters:
objects
- Objects to be converted toStructuredInnerList
items. For details, seeof(Collection)
.parameters
- Parameter map. For details, checkStructuredParameters.of(Map)
.- Returns:
- Created Structured Inner List
- Throws:
IllegalArgumentException
- Invalid objects provided
-
withParams
public static StructuredInnerList withParams(Collection<?> objects, StructuredParameters parameters) Creates Structured String of given object collection and parameters- Parameters:
objects
- Objects to be converted toStructuredInnerList
items. For details, seeof(Collection)
.parameters
- Structured Parameter- Returns:
- Created Structured Inner List
- Throws:
IllegalArgumentException
- Invalid objects provided
-
itemList
Description copied from interface:StructuredCollection
ReturnsList
of Structured Items stored in this Structured List- Specified by:
itemList
in interfaceStructuredCollection
- Type Parameters:
T
- Specific Item class if needed. No type check is performed, only simple casting.- Returns:
- Underlying list of
StructuredItem
objects
-
equals
Description copied from class:StructuredItem
Compares the specified object with this Structured Item for equality. Returns true if the given object is of the same class as this Item, it has the same value and properties.- Overrides:
equals
in classStructuredItem
- Parameters:
o
- Object to be compared with this Structured Item- Returns:
- True is specified object is equal to this Structured Item
-
hashCode
public int hashCode()Description copied from class:StructuredItem
Returns hash code for this Structured Item. The hash code is a combination of hash codes of Item parameters and Item value.- Overrides:
hashCode
in classStructuredItem
- Returns:
- The hash code for this Structured Item
-