Record Class DataComponentMatchers
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentMatchers
public record DataComponentMatchers(Map<DataComponentType<?>,DataComponent<?,?>> exactMatchers, int[] partialMatchers)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataComponentMatchers(Map<DataComponentType<?>, DataComponent<?, ?>> exactMatchers, int[] partialMatchers) Creates an instance of aDataComponentMatchersrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull DataComponentMatchers.DataComponentMatchersBuilderbuilder()final booleanIndicates whether some other object is "equal to" this one.Map<DataComponentType<?>,DataComponent<?, ?>> Returns the value of theexactMatchersrecord component.final inthashCode()Returns a hash code value for this object.int[]Returns the value of thepartialMatchersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataComponentMatchers
public DataComponentMatchers(Map<DataComponentType<?>, DataComponent<?, ?>> exactMatchers, int[] partialMatchers) Creates an instance of aDataComponentMatchersrecord class.- Parameters:
exactMatchers- the value for theexactMatchersrecord componentpartialMatchers- the value for thepartialMatchersrecord component
-
-
Method Details
-
builder
-
toBuilder
-
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). -
exactMatchers
Returns the value of theexactMatchersrecord component.- Returns:
- the value of the
exactMatchersrecord component
-
partialMatchers
public int[] partialMatchers()Returns the value of thepartialMatchersrecord component.- Returns:
- the value of the
partialMatchersrecord component
-