Package cdc.issues

Record Class MetasImpl

java.lang.Object
java.lang.Record
cdc.issues.MetasImpl
All Implemented Interfaces:
Metas, NameValueMap

record MetasImpl(Map<String,String> map) extends Record implements Metas
  • Constructor Details

    • MetasImpl

      MetasImpl(Map<String,String> map)
      Creates an instance of a MetasImpl 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.
    • getMetas

      public Collection<Meta> getMetas()
      Specified by:
      getMetas in interface Metas
      Returns:
      A collection of Meta.
    • getSortedMetas

      public List<Meta> getSortedMetas()
      Specified by:
      getSortedMetas in interface Metas
      Returns:
      A list of Meta 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.
    • 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