Package org.simpleframework.xml.core
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 java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
ParameterMap
public ParameterMap()Constructor for theParameterMap
object. 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 overParameter
objects. 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 aParameter
using 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 ofParameter
objects 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
-