Package org.ethelred.kiwiproc.processor
Record Class StringFormatConversion
java.lang.Object
java.lang.Record
org.ethelred.kiwiproc.processor.StringFormatConversion
- All Implemented Interfaces:
Conversion
public record StringFormatConversion(@Nullable String warning, String conversionFormat, Object[] baseArgs)
extends Record
implements Conversion
-
Constructor Summary
ConstructorsConstructorDescriptionStringFormatConversion(@Nullable String warning, String conversionFormat, Object... baseArgs) Creates an instance of aStringFormatConversionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionObject[]baseArgs()Returns the value of thebaseArgsrecord component.Returns the value of theconversionFormatrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanisValid()final StringtoString()Returns a string representation of this record class.@Nullable Stringwarning()Returns the value of thewarningrecord component.Object[]withAccessor(String accessor)
-
Constructor Details
-
StringFormatConversion
public StringFormatConversion(@Nullable String warning, String conversionFormat, Object... baseArgs) Creates an instance of aStringFormatConversionrecord class.- Parameters:
warning- the value for thewarningrecord componentconversionFormat- the value for theconversionFormatrecord componentbaseArgs- the value for thebaseArgsrecord component
-
-
Method Details
-
hasWarning
public boolean hasWarning()- Specified by:
hasWarningin interfaceConversion
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceConversion
-
withAccessor
-
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). -
warning
Returns the value of thewarningrecord component.- Specified by:
warningin interfaceConversion- Returns:
- the value of the
warningrecord component
-
conversionFormat
Returns the value of theconversionFormatrecord component.- Returns:
- the value of the
conversionFormatrecord component
-
baseArgs
Returns the value of thebaseArgsrecord component.- Returns:
- the value of the
baseArgsrecord component
-