Class ParameterMap

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Parameter>, Map<Object,Parameter>, SequencedMap<Object,Parameter>

class ParameterMap extends LinkedHashMap<Object,Parameter> implements Iterable<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.
  • Constructor Details

    • ParameterMap

      public ParameterMap()
      Constructor for the ParameterMap 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

      public Iterator<Parameter> iterator()
      This is used to iterate over Parameter objects. Parameters are iterated in the order that they are added to the map. This is primarily used for convenience iteration.
      Specified by:
      iterator in interface Iterable<Parameter>
      Returns:
      this returns an iterator for the parameters
    • get

      public Parameter get(int ordinal)
      This is used to acquire a Parameter 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

      public List<Parameter> getAll()
      This is used to acquire an list of Parameter 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