Record Class ModelPlaceholder
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelPlaceholder
- Record Components:
variables- a map of placeholder variable names to their string values
Represents animation variable placeholders defined in a model file.
These placeholders allow for defining reusable values or expressions that can be referenced within Molang scripts in animations.
- Since:
- 1.15.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelPlaceholderAn empty placeholder instance with no variables.static final com.google.gson.JsonDeserializer<ModelPlaceholder> A JSON deserializer for parsing placeholders from a multi-line string. -
Constructor Summary
ConstructorsConstructorDescriptionModelPlaceholder(@NotNull @Unmodifiable Map<String, String> variables) Creates an instance of aModelPlaceholderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull StringparseVariable(@NotNull String expression) Replaces all placeholder variables in a given expression with their corresponding values.final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.
-
Field Details
-
EMPTY
An empty placeholder instance with no variables.- Since:
- 1.15.2
-
PARSER
A JSON deserializer for parsing placeholders from a multi-line string.- Since:
- 1.15.2
-
-
Constructor Details
-
ModelPlaceholder
-
-
Method Details
-
parseVariable
Replaces all placeholder variables in a given expression with their corresponding values.- Parameters:
expression- the expression containing placeholders- Returns:
- the expression with placeholders substituted
- Since:
- 1.15.2
-
toString
-
hashCode
-
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). -
variables
-