Record Class GroupedCodecSpec.DatePrefix

java.lang.Object
java.lang.Record
me.ahoo.cosid.runtime.GroupedCodecSpec.DatePrefix
Record Components:
delimiter - the text between the period and the value
value - the codec list of the value, applied in order
outer - the decorations of the text that starts with the period key (prefixes, suffixes, date prefixes), applied in order; empty puts the period first
All Implemented Interfaces:
GroupedCodecSpec
Enclosing interface:
GroupedCodecSpec

public static record GroupedCodecSpec.DatePrefix(String delimiter, List<CodecSpec> value, List<CodecSpec> outer) extends Record implements GroupedCodecSpec
GroupedCodec.datePrefix(me.ahoo.cosid.segment.Period, String, me.ahoo.cosid.codec.IdCodec, java.util.function.UnaryOperator): the period key, the delimiter, then the value; outer decorates the whole, so with a prefix in it the period follows a business prefix (the 4.x group-prefix.before-prefix).
  • Constructor Details

    • DatePrefix

      public DatePrefix(String delimiter, List<CodecSpec> value, List<CodecSpec> outer)
      Creates an instance of a DatePrefix record class.
      Parameters:
      delimiter - the value for the delimiter record component
      value - the value for the value record component
      outer - the value for the outer record component
    • DatePrefix

      public DatePrefix(String delimiter, List<CodecSpec> value)
      The period first: the period key, the delimiter, then the value.
      Parameters:
      delimiter - the text between the period and the value
      value - the codec list of the value, applied in order
  • Method Details

    • toString

      public final 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
    • 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.
    • delimiter

      public String delimiter()
      Returns the value of the delimiter record component.
      Returns:
      the value of the delimiter record component
    • value

      public List<CodecSpec> value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • outer

      public List<CodecSpec> outer()
      Returns the value of the outer record component.
      Returns:
      the value of the outer record component