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
Modifier and TypeFieldDescriptionprivate final MinMaxBounds.Ints
The field for thecount
record component.private final P
The field for thetest
record component. -
Constructor Summary
ConstructorDescriptionEntry
(P test, MinMaxBounds.Ints count) Creates an instance of aEntry
record 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 thecount
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.test()
Returns the value of thetest
record component.boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
test
The field for thetest
record component. -
count
The field for thecount
record component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
test
- the value for thetest
record componentcount
- the value for thecount
record 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 thetest
record component.- Returns:
- the value of the
test
record component
-
count
Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-