Record Class ListOperation.StandAlone<T>
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.functions.ListOperation.StandAlone<T>
- Enclosing interface:
ListOperation
public static record ListOperation.StandAlone<T>(List<T> value, ListOperation operation)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ListOperationThe field for theoperationrecord component.The field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStandAlone(List<T> value, ListOperation operation) Creates an instance of aStandAlonerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<ListOperation.StandAlone<T>> codec(com.mojang.serialization.Codec<T> pElementCodec, int pMaxSize) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoperationrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
value
The field for thevaluerecord component. -
operation
The field for theoperationrecord component.
-
-
Constructor Details
-
StandAlone
Creates an instance of aStandAlonerecord class.- Parameters:
value- the value for thevaluerecord componentoperation- the value for theoperationrecord component
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<ListOperation.StandAlone<T>> codec(com.mojang.serialization.Codec<T> pElementCodec, int pMaxSize) -
apply
-
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-