Record Class LayerTemplateValue.FormattedValue<T>
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.rendertype.layer.LayerTemplateValue.FormattedValue<T>
- All Implemented Interfaces:
LayerTemplateValue<T>
- Enclosing interface:
LayerTemplateValue<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.api.client.render.rendertype.layer.LayerTemplateValue
LayerTemplateValue.FormattedValue<T>, LayerTemplateValue.RawValue<T> -
Field Summary
Fields inherited from interface foundry.veil.api.client.render.rendertype.layer.LayerTemplateValue
LOCATION_CODEC, STRING_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFormattedValue(String rawValue, Function<String, T> decoder) Creates an instance of aFormattedValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondecoder()Returns the value of thedecoderrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Attempts to parse the real value of this template.rawValue()Returns the value of therawValuerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FormattedValue
Creates an instance of aFormattedValuerecord class.- Parameters:
rawValue- the value for therawValuerecord componentdecoder- the value for thedecoderrecord component
-
-
Method Details
-
parse
Description copied from interface:LayerTemplateValueAttempts to parse the real value of this template.- Specified by:
parsein interfaceLayerTemplateValue<T>- Parameters:
params- The provided parameters for formatting- Returns:
- The value of this template
-
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). -
rawValue
Returns the value of therawValuerecord component.- Specified by:
rawValuein interfaceLayerTemplateValue<T>- Returns:
- the value of the
rawValuerecord component
-
decoder
Returns the value of thedecoderrecord component.- Returns:
- the value of the
decoderrecord component
-