Record Class GroupedCodecSpec.FormattedDatePrefix

java.lang.Object
java.lang.Record
me.ahoo.cosid.runtime.GroupedCodecSpec.FormattedDatePrefix
Record Components:
pattern - the date pattern of the key in the text, such as yyMMdd
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.FormattedDatePrefix(String pattern, String delimiter, List<CodecSpec> value, List<CodecSpec> outer) extends Record implements GroupedCodecSpec
GroupedCodec.datePrefix(me.ahoo.cosid.segment.Period, String, String, me.ahoo.cosid.codec.IdCodec, java.util.function.UnaryOperator): GroupedCodecSpec.DatePrefix with the period key written in pattern, such as yyMMdd (the 4.x group.pattern); the period keys themselves, and so the store keys, keep the preset's pattern. For a preset period only.
  • Constructor Details

    • FormattedDatePrefix

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

      public FormattedDatePrefix(String pattern, String delimiter, List<CodecSpec> value)
      The period first: the period key in pattern, the delimiter, then the value.
      Parameters:
      pattern - the date pattern of the key in the text, such as yyMMdd
      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.
    • pattern

      public String pattern()
      Returns the value of the pattern record component.
      Returns:
      the value of the pattern record component
    • 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