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 ListOperation
The field for theoperation
record component.The field for thevalue
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStandAlone
(List<T> value, ListOperation operation) Creates an instance of aStandAlone
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec
<ListOperation.StandAlone<T>> codec
(com.mojang.serialization.Codec<T> p_341683_, int p_341655_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoperation
record component.final String
toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Field Details
-
value
The field for thevalue
record component. -
operation
The field for theoperation
record component.
-
-
Constructor Details
-
StandAlone
Creates an instance of aStandAlone
record class.- Parameters:
value
- the value for thevalue
record componentoperation
- the value for theoperation
record component
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<ListOperation.StandAlone<T>> codec(com.mojang.serialization.Codec<T> p_341683_, int p_341655_) -
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 thevalue
record component.- Returns:
- the value of the
value
record component
-
operation
Returns the value of theoperation
record component.- Returns:
- the value of the
operation
record component
-