Class ParameterMap
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<Parameter>, Map<Object, Parameter>, SequencedMap<Object, Parameter>
The
ParameterMap object represents of parameters
that are present within an objects constructors. This is used
for convenience to iterate over parameters and also to acquire
parameters by index, that is, the position they appear in the
constructor signature.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
ParameterMap
public ParameterMap()Constructor for theParameterMapobject. This is used to create a linked hash map of parameters where each parameter can be acquired by its index within a constructor.
-
-
Method Details
-
iterator
This is used to iterate overParameterobjects. Parameters are iterated in the order that they are added to the map. This is primarily used for convenience iteration. -
get
This is used to acquire aParameterusing the position of that parameter within the constructors. This allows a builder to determine which parameters to use.- Parameters:
ordinal- this is the position of the parameter- Returns:
- this returns the parameter for the position
-
getAll
This is used to acquire an list ofParameterobjects in declaration order. This list will help with the resolution of the correct constructor for deserialization of the XML. It also provides a faster method of iteration.- Returns:
- this returns the parameters in declaration order
-