Record Class DataProviders.PriorityAndRequirement
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.core.DataProviders.PriorityAndRequirement
- Enclosing class:
DataProviders
public static record DataProviders.PriorityAndRequirement(int priority, Optional<ExtensibleCodecBase.Entry<Boolean>> requirement)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DataProviders.PriorityAndRequirement> static final DataProviders.PriorityAndRequirementstatic final com.mojang.serialization.MapCodec<DataProviders.PriorityAndRequirement> static final com.mojang.serialization.MapCodec<Integer> -
Constructor Summary
ConstructorsConstructorDescriptionPriorityAndRequirement(int priority, Optional<ExtensibleCodecBase.Entry<Boolean>> requirement) Creates an instance of aPriorityAndRequirementrecord 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.intpriority()Returns the value of thepriorityrecord component.Returns the value of therequirementrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
PRIORITY_CODEC
-
CODEC
-
MAP_CODEC
public static final com.mojang.serialization.MapCodec<DataProviders.PriorityAndRequirement> MAP_CODEC
-
-
Constructor Details
-
PriorityAndRequirement
public PriorityAndRequirement(int priority, Optional<ExtensibleCodecBase.Entry<Boolean>> requirement) Creates an instance of aPriorityAndRequirementrecord class.- Parameters:
priority- the value for thepriorityrecord componentrequirement- the value for therequirementrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
requirement
Returns the value of therequirementrecord component.- Returns:
- the value of the
requirementrecord component
-