Package cdc.issues

Record Class ParamsImpl

java.lang.Object
java.lang.Record
cdc.issues.ParamsImpl
All Implemented Interfaces:
NameValueMap, Params, Comparable<Params>

record ParamsImpl(Map<String,String> map) extends Record implements Params
  • Constructor Details

    • ParamsImpl

      ParamsImpl(Map<String,String> map)
      Creates an instance of a ParamsImpl record class.
      Parameters:
      map - the value for the map record component
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface NameValueMap
      Returns:
      true if this map is empty.
    • getNames

      public Set<String> getNames()
      Specified by:
      getNames in interface NameValueMap
      Returns:
      The set of names.
    • getSortedNames

      public List<String> getSortedNames()
      Specified by:
      getSortedNames in interface NameValueMap
      Returns:
      The sorted names.
    • getValue

      public String getValue(String name)
      Specified by:
      getValue in interface NameValueMap
      Parameters:
      name - The name.
      Returns:
      The value associated to name or null.
    • getValue

      public String getValue(String name, String def)
      Specified by:
      getValue in interface NameValueMap
      Parameters:
      name - The name.
      def - The default value to return.
      Returns:
      The value associated to name or def.
    • getParams

      public Collection<Param> getParams()
      Specified by:
      getParams in interface Params
      Returns:
      A collection of Param.
    • getSortedParams

      public List<Param> getSortedParams()
      Specified by:
      getSortedParams in interface Params
      Returns:
      A list of Param sorted using their name.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • getNameValues

      public Collection<? extends NameValue> getNameValues()
      Specified by:
      getNameValues in interface NameValueMap
      Returns:
      A collection of NameValue.
    • getSortedNameValues

      public List<? extends NameValue> getSortedNameValues()
      Specified by:
      getSortedNameValues in interface NameValueMap
      Returns:
      A list of NameValue sorted using their name.
    • compareTo

      public int compareTo(Params other)
      Specified by:
      compareTo in interface Comparable<Params>
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • map

      public Map<String,String> map()
      Returns the value of the map record component.
      Returns:
      the value of the map record component