Record Class ConditionDescription<X extends Condition<Y>,Y>
java.lang.Object
java.lang.Record
gg.xp.xivsupport.events.triggers.easytriggers.model.ConditionDescription<X,Y>
public record ConditionDescription<X extends Condition<Y>,Y> (Class<X extends Condition<Y>> clazz, Class<Y> appliesTo, String description, Supplier<X extends Condition<Y>> instanceCreator, BiFunction<X extends Condition<Y>,HasMutableConditions<?>,Component> guiprovider, ConditionTarget target)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionConditionDescription(Class<X> clazz, Class<Y> appliesTo, String description, Supplier<X> instanceCreator, BiFunction<X, HasMutableConditions<?>, Component> guiprovider) Constructor with default target of BOTH for backward compatibilityConditionDescription(Class<X> clazz, Class<Y> appliesTo, String description, Supplier<X> instanceCreator, BiFunction<X, HasMutableConditions<?>, Component> guiprovider, ConditionTarget target) Creates an instance of aConditionDescriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theappliesTorecord component.booleanclazz()Returns the value of theclazzrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theguiproviderrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceCreatorrecord component.newInst()target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConditionDescription
public ConditionDescription(Class<X> clazz, Class<Y> appliesTo, String description, Supplier<X> instanceCreator, BiFunction<X, HasMutableConditions<?>, Component> guiprovider) Constructor with default target of BOTH for backward compatibility -
ConditionDescription
public ConditionDescription(Class<X> clazz, Class<Y> appliesTo, String description, Supplier<X> instanceCreator, BiFunction<X, HasMutableConditions<?>, Component> guiprovider, ConditionTarget target) Creates an instance of aConditionDescriptionrecord class.- Parameters:
clazz- the value for theclazzrecord componentappliesTo- the value for theappliesTorecord componentdescription- the value for thedescriptionrecord componentinstanceCreator- the value for theinstanceCreatorrecord componentguiprovider- the value for theguiproviderrecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
appliesTo
-
newInst
-
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). -
clazz
Returns the value of theclazzrecord component.- Returns:
- the value of the
clazzrecord component
-
appliesTo
Returns the value of theappliesTorecord component.- Returns:
- the value of the
appliesTorecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
instanceCreator
Returns the value of theinstanceCreatorrecord component.- Returns:
- the value of the
instanceCreatorrecord component
-
guiprovider
Returns the value of theguiproviderrecord component.- Returns:
- the value of the
guiproviderrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-