Record Class WithConditions<A>
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.conditions.WithConditions<A>
- 
Nested Class Summary
Nested Classes - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AThe field for thecarrierrecord component.private final List<ICondition>The field for theconditionsrecord component. - 
Constructor Summary
ConstructorsConstructorDescriptionWithConditions(A carrier) WithConditions(A carrier, ICondition... conditions) WithConditions(List<ICondition> conditions, A carrier) Creates an instance of aWithConditionsrecord class. - 
Method Summary
Modifier and TypeMethodDescriptionstatic <A> WithConditions.Builder<A>builder(A carrier) carrier()Returns the value of thecarrierrecord component.Returns the value of theconditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class. 
- 
Field Details
- 
conditions
The field for theconditionsrecord component. - 
carrier
The field for thecarrierrecord component. 
 - 
 - 
Constructor Details
- 
WithConditions
 - 
WithConditions
 - 
WithConditions
Creates an instance of aWithConditionsrecord class.- Parameters:
 conditions- the value for theconditionsrecord componentcarrier- the value for thecarrierrecord 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 theconditionsrecord component.- Returns:
 - the value of the 
conditionsrecord component 
 - 
carrier
Returns the value of thecarrierrecord component.- Returns:
 - the value of the 
carrierrecord component 
 
 -