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 TypeMethodDescriptionbooleanCompares the specified object with this Structured Item for equality.inthashCode()Returns hash code for this Structured Item.<T extends StructuredItem>
List<T>itemList()ReturnsListof Structured Items stored in this Structured Liststatic StructuredInnerListCreates Structured Inner List from given objects, without parameters for the inner liststatic StructuredInnerListof(Collection<?> objects) Creates Structured Inner List from given Collection elements, without parameters for the inner liststatic StructuredInnerListwithParams(Collection<?> objects, Map<String, ?> parameters) Creates Structured String of given object collection and parametersstatic StructuredInnerListwithParams(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, toStringMethods 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 toStructuredInnerListitems- 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 toStructuredInnerListitems- 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 toStructuredInnerListitems. 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 toStructuredInnerListitems. For details, seeof(Collection).parameters- Structured Parameter- Returns:
- Created Structured Inner List
- Throws:
IllegalArgumentException- Invalid objects provided
-
itemList
Description copied from interface:StructuredCollectionReturnsListof Structured Items stored in this Structured List- Specified by:
itemListin interfaceStructuredCollection- Type Parameters:
T- Specific Item class if needed. No type check is performed, only simple casting.- Returns:
- Underlying list of
StructuredItemobjects
-
equals
Description copied from class:StructuredItemCompares 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:
equalsin 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:StructuredItemReturns hash code for this Structured Item. The hash code is a combination of hash codes of Item parameters and Item value.- Overrides:
hashCodein classStructuredItem- Returns:
- The hash code for this Structured Item
-