Package net.minecraft.core.component
Record Class DataComponentPatch.SplitResult
java.lang.Object
java.lang.Record
net.minecraft.core.component.DataComponentPatch.SplitResult
- Enclosing class:
DataComponentPatch
public static record DataComponentPatch.SplitResult(DataComponentMap added, Set<DataComponentType<?>> removed)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DataComponentMap
The field for theadded
record component.static final DataComponentPatch.SplitResult
private final Set
<DataComponentType<?>> The field for theremoved
record component. -
Constructor Summary
ConstructorDescriptionSplitResult
(DataComponentMap added, Set<DataComponentType<?>> removed) Creates an instance of aSplitResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionadded()
Returns the value of theadded
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.Set
<DataComponentType<?>> removed()
Returns the value of theremoved
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
added
The field for theadded
record component. -
removed
The field for theremoved
record component. -
EMPTY
-
-
Constructor Details
-
SplitResult
Creates an instance of aSplitResult
record class.- Parameters:
added
- the value for theadded
record componentremoved
- the value for theremoved
record component
-
-
Method Details
-
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)
. -
added
Returns the value of theadded
record component.- Returns:
- the value of the
added
record component
-
removed
Returns the value of theremoved
record component.- Returns:
- the value of the
removed
record component
-