Record Class WithConditions<A>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.conditions.WithConditions<A>
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final A
The field for thecarrier
record component.private final List
<ICondition> The field for theconditions
record component. -
Constructor Summary
ConstructorDescriptionWithConditions
(A carrier) WithConditions
(A carrier, ICondition... conditions) WithConditions
(List<ICondition> conditions, A carrier) Creates an instance of aWithConditions
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> WithConditions.Builder
<A> builder
(A carrier) carrier()
Returns the value of thecarrier
record component.Returns the value of theconditions
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
conditions
The field for theconditions
record component. -
carrier
The field for thecarrier
record component.
-
-
Constructor Details
-
WithConditions
-
WithConditions
-
WithConditions
Creates an instance of aWithConditions
record class.- Parameters:
conditions
- the value for theconditions
record componentcarrier
- the value for thecarrier
record component
-
-
Method Details
-
builder
-
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)
. -
conditions
Returns the value of theconditions
record component.- Returns:
- the value of the
conditions
record component
-
carrier
Returns the value of thecarrier
record component.- Returns:
- the value of the
carrier
record component
-