Record Class CollectionPredicate<T,P extends Predicate<T>>
java.lang.Object
java.lang.Record
net.minecraft.predicate.collection.CollectionPredicate<T,P>
- Record Components:
contains-counts-size-
public record CollectionPredicate<T,P extends Predicate<T>> (Optional<CollectionContainsPredicate<T,P extends Predicate<T>>> contains, Optional<CollectionCountsPredicate<T,P extends Predicate<T>>> counts, Optional<NumberRange.IntRange> size)
extends Record
implements Predicate<Iterable<T>>
- Mappings:
Namespace Name named net/minecraft/predicate/collection/CollectionPredicateintermediary net/minecraft/class_9648official bdnamed containsintermediary comp_2617official anamed countsintermediary comp_2618official bnamed sizeintermediary comp_2619official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Optional<CollectionContainsPredicate<T, P>> The field for thecontainsrecord component.private final Optional<CollectionCountsPredicate<T, P>> The field for thecountsrecord component.private final Optional<NumberRange.IntRange> The field for thesizerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCollectionPredicate(Optional<CollectionContainsPredicate<T, P>> optional, Optional<CollectionCountsPredicate<T, P>> optional2, Optional<NumberRange.IntRange> optional3) -
Method Summary
Modifier and TypeMethodDescriptioncontains()Returns the value of thecontainsrecord component.counts()Returns the value of thecountsrecord component.static <T,P extends Predicate<T>>
com.mojang.serialization.Codec<CollectionPredicate<T, P>> createCodec(com.mojang.serialization.Codec<P> predicateCodec) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.size()Returns the value of thesizerecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
CollectionPredicate
public CollectionPredicate(Optional<CollectionContainsPredicate<T, P>> optional, Optional<CollectionCountsPredicate<T, P>> optional2, Optional<NumberRange.IntRange> optional3)
-
-
Method Details
-
createCodec
public static <T,P extends Predicate<T>> com.mojang.serialization.Codec<CollectionPredicate<T,P>> createCodec(com.mojang.serialization.Codec<P> predicateCodec) - Mappings:
Namespace Name Mixin selector named createCodecLnet/minecraft/predicate/collection/CollectionPredicate;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_59623Lnet/minecraft/class_9648;method_59623(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;official aLbd;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
test
- Specified by:
testin interfacePredicate<T>- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/collection/CollectionPredicate;test(Ljava/lang/Iterable;)Zintermediary method_59625Lnet/minecraft/class_9648;method_59625(Ljava/lang/Iterable;)Zofficial aLbd;a(Ljava/lang/Iterable;)Z
-
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). -
contains
Returns the value of thecontainsrecord component.- Returns:
- the value of the
containsrecord component
-
counts
Returns the value of thecountsrecord component.- Returns:
- the value of the
countsrecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-