Record Class Selector.Condition
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.resource.asset.definition.Selector.Condition
- All Implemented Interfaces:
Selector
- Enclosing interface:
Selector
public static record Selector.Condition(Selector.Condition.Property property, Selector onTrue, Selector onFalse, @Nullable Selector.Transformation transformation)
extends Record
implements Selector
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic final recordstatic final recordstatic classstatic classstatic classstatic final recordstatic final recordstatic interfacestatic classstatic classstatic classNested classes/interfaces inherited from interface Selector
Selector.BundleSelectedItem, Selector.Composite, Selector.Condition, Selector.Empty, Selector.Model, Selector.RangeDispatch, Selector.Select, Selector.Special, Selector.Transformation -
Constructor Summary
ConstructorsConstructorDescriptionCondition(Selector.Condition.Property property, Selector onTrue, Selector onFalse) Condition(Selector.Condition.Property property, Selector onTrue, Selector onFalse, Selector.Transformation transformation) Creates an instance of aConditionrecord 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.id()onFalse()Returns the value of theonFalserecord component.onTrue()Returns the value of theonTruerecord component.property()Returns the value of thepropertyrecord component.toJson()final StringtoString()Returns a string representation of this record class.Returns the value of thetransformationrecord component.
-
Constructor Details
-
Condition
-
Condition
public Condition(Selector.Condition.Property property, Selector onTrue, Selector onFalse, @Nullable Selector.Transformation transformation) Creates an instance of aConditionrecord class.- Parameters:
property- the value for thepropertyrecord componentonTrue- the value for theonTruerecord componentonFalse- the value for theonFalserecord componenttransformation- the value for thetransformationrecord component
-
-
Method Details
-
id
-
toJson
-
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). -
property
Returns the value of thepropertyrecord component.- Returns:
- the value of the
propertyrecord component
-
onTrue
Returns the value of theonTruerecord component.- Returns:
- the value of the
onTruerecord component
-
onFalse
Returns the value of theonFalserecord component.- Returns:
- the value of the
onFalserecord component
-
transformation
Returns the value of thetransformationrecord component.- Returns:
- the value of the
transformationrecord component
-