Class 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>
    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

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      ParameterMap()
      Constructor for the ParameterMap object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Parameter get​(int ordinal)
      This is used to acquire a Parameter using the position of that parameter within the constructors.
      java.util.List<Parameter> getAll()
      This is used to acquire an list of Parameter objects in declaration order.
      java.util.Iterator<Parameter> iterator()
      This is used to iterate over Parameter objects.
      • 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
      • 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
    • Constructor Detail

      • 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 Detail

      • iterator

        public java.util.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 java.lang.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 java.util.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