Record Class ScriptPropertyMetadata
java.lang.Object
java.lang.Record
de.gurkenlabs.litiengine.scripting.ScriptPropertyMetadata
- Record Components:
name- The Java field name used for binding.displayName- The label intended for editors and tools.description- Explanatory text for users configuring the field.category- The optional group under which an editor should display the field.type- The configured editor type identifier, or the Java field type name when no override is configured.defaultValue- The default value represented as text.min- The inclusive suggested minimum, orDouble.NEGATIVE_INFINITYwhen unspecified.max- The inclusive suggested maximum, orDouble.POSITIVE_INFINITYwhen unspecified.unit- The optional unit displayed with numeric values.required- Whether a binding must provide a value.
public record ScriptPropertyMetadata(String name, String displayName, String description, String category, String type, String defaultValue, double min, double max, String unit, boolean required)
extends Record
Editor-facing description of one configurable script field discovered from its implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thedefaultValuerecord component.Returns the value of thedescriptionrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemax()Returns the value of themaxrecord component.doublemin()Returns the value of theminrecord component.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.unit()Returns the value of theunitrecord component.
-
Constructor Details
-
ScriptPropertyMetadata
public ScriptPropertyMetadata(String name, String displayName, String description, String category, String type, String defaultValue, double min, double max, String unit, boolean required) Creates an instance of aScriptPropertyMetadatarecord class.- Parameters:
name- the value for thenamerecord componentdisplayName- the value for thedisplayNamerecord componentdescription- the value for thedescriptionrecord componentcategory- the value for thecategoryrecord componenttype- the value for thetyperecord componentdefaultValue- the value for thedefaultValuerecord componentmin- the value for theminrecord componentmax- the value for themaxrecord componentunit- the value for theunitrecord componentrequired- the value for therequiredrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
category
-
type
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
min
-
max
-
unit
-
required
-