Package org.simpleframework.xml.core
Class ParameterMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.Object,Parameter>
-
- org.simpleframework.xml.core.ParameterMap
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<Parameter>,java.util.Map<java.lang.Object,Parameter>
class ParameterMap extends java.util.LinkedHashMap<java.lang.Object,Parameter> implements java.lang.Iterable<Parameter>
TheParameterMapobject 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.
-
-
Constructor Summary
Constructors Constructor Description ParameterMap()Constructor for theParameterMapobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parameterget(int ordinal)This is used to acquire aParameterusing the position of that parameter within the constructors.java.util.List<Parameter>getAll()This is used to acquire an list ofParameterobjects in declaration order.java.util.Iterator<Parameter>iterator()This is used to iterate overParameterobjects.-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
iterator
public java.util.Iterator<Parameter> 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.- Specified by:
iteratorin interfacejava.lang.Iterable<Parameter>- Returns:
- this returns an iterator for the parameters
-
get
public Parameter get(int ordinal)
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
public java.util.List<Parameter> 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
-
-