Record Class Circumstance.CircumstanceData
java.lang.Object
java.lang.Record
me.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceData
- Enclosing class:
Circumstance
public static record Circumstance.CircumstanceData(me.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceType circumstanceType, boolean required)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCircumstanceData(me.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceType circumstanceType, boolean required) Creates an instance of aCircumstanceDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionme.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceTypeReturns the value of thecircumstanceTyperecord component.booleandeny(EntityWrapper entityWrapper) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CircumstanceData
public CircumstanceData(me.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceType circumstanceType, boolean required) Creates an instance of aCircumstanceDatarecord class.- Parameters:
circumstanceType- the value for thecircumstanceTyperecord componentrequired- the value for therequiredrecord component
-
-
Method Details
-
deny
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
circumstanceType
public me.deecaad.weaponmechanics.weapon.trigger.Circumstance.CircumstanceType circumstanceType()Returns the value of thecircumstanceTyperecord component.- Returns:
- the value of the
circumstanceTyperecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-