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 basefriendly- turns a time-based id into readable textprefix- a text prefixsuffix- a text suffixdatePrefix- a date prefix; as the first item of a periodic segment without aperioditem, the period prefixcustom- a codec bean name or class nameperiod- 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 Summary
ConstructorsConstructorDescriptionCodec(CosIdProperties.Radix radix, CosIdProperties.Friendly friendly, String prefix, String suffix, CosIdProperties.DatePrefix datePrefix, String custom, CosIdProperties.PeriodText period) Creates an instance of aCodecrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncustom()Returns the value of thecustomrecord component.Returns the value of thedatePrefixrecord component.final booleanIndicates whether some other object is "equal to" this one.friendly()Returns the value of thefriendlyrecord component.final inthashCode()Returns a hash code value for this object.period()Returns the value of theperiodrecord component.prefix()Returns the value of theprefixrecord component.radix()Returns the value of theradixrecord component.suffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Codec
public Codec(CosIdProperties.Radix radix, CosIdProperties.Friendly friendly, String prefix, String suffix, CosIdProperties.DatePrefix datePrefix, String custom, CosIdProperties.PeriodText period) Creates an instance of aCodecrecord class.- Parameters:
radix- the value for theradixrecord componentfriendly- the value for thefriendlyrecord componentprefix- the value for theprefixrecord componentsuffix- the value for thesuffixrecord componentdatePrefix- the value for thedatePrefixrecord componentcustom- the value for thecustomrecord componentperiod- the value for theperiodrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
radix
Returns the value of theradixrecord component.- Returns:
- the value of the
radixrecord component
-
friendly
Returns the value of thefriendlyrecord component.- Returns:
- the value of the
friendlyrecord component
-
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
suffix
Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-
datePrefix
Returns the value of thedatePrefixrecord component.- Returns:
- the value of the
datePrefixrecord component
-
custom
Returns the value of thecustomrecord component.- Returns:
- the value of the
customrecord component
-
period
Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-