Record Class CosIdProperties.Codec

java.lang.Object
java.lang.Record
me.ahoo.cosid.spring.autoconfigure.CosIdProperties.Codec
Record Components:
radix - turns the id into text in a base
friendly - turns a time-based id into readable text
prefix - a text prefix
suffix - a text suffix
datePrefix - a date prefix; as the first item of a periodic segment without a period item, the period prefix
custom - a codec bean name or class name
period - periodic segment only: where the period key goes; the items before it apply to the value, the items after it decorate the text that starts with the key
Enclosing class:
CosIdProperties

public static record CosIdProperties.Codec(CosIdProperties.Radix radix, CosIdProperties.Friendly friendly, String prefix, String suffix, CosIdProperties.DatePrefix datePrefix, String custom, CosIdProperties.PeriodText period) extends Record
An item of a codec list: exactly one of its fields.
  • Constructor Details

  • 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.
    • radix

      public CosIdProperties.Radix radix()
      Returns the value of the radix record component.
      Returns:
      the value of the radix record component
    • friendly

      public CosIdProperties.Friendly friendly()
      Returns the value of the friendly record component.
      Returns:
      the value of the friendly record component
    • prefix

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

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

      public CosIdProperties.DatePrefix datePrefix()
      Returns the value of the datePrefix record component.
      Returns:
      the value of the datePrefix record component
    • custom

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

      public CosIdProperties.PeriodText period()
      Returns the value of the period record component.
      Returns:
      the value of the period record component