Record Class CollectionCountsPredicate.Entry<T,P extends Predicate<T>>
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.CollectionCountsPredicate.Entry<T,P>
- Enclosing interface:
CollectionCountsPredicate<T,P extends Predicate<T>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinMaxBounds.IntsThe field for thecountrecord component.private final PThe field for thetestrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEntry(P test, MinMaxBounds.Ints count) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,P extends Predicate<T>>
com.mojang.serialization.Codec<CollectionCountsPredicate.Entry<T, P>> codec(com.mojang.serialization.Codec<P> p_341286_) count()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.test()Returns the value of thetestrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
test
The field for thetestrecord component. -
count
The field for thecountrecord component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
test- the value for thetestrecord componentcount- the value for thecountrecord component
-
-
Method Details
-
codec
public static <T,P extends Predicate<T>> com.mojang.serialization.Codec<CollectionCountsPredicate.Entry<T,P>> codec(com.mojang.serialization.Codec<P> p_341286_) -
test
-
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). -
test
Returns the value of thetestrecord component.- Returns:
- the value of the
testrecord component
-
count
Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-