Record Class DataComponentPredicate.Exists
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.predicate.DataComponentPredicate.Exists
- Record Components:
component- the component which must be present
- All Implemented Interfaces:
Predicate<DataComponent.Holder>, DataComponentPredicate
- Enclosing interface:
DataComponentPredicate
public static record DataComponentPredicate.Exists(DataComponent<?> component)
extends Record
implements DataComponentPredicate
Tests whether a data component is present, without inspecting its value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface DataComponentPredicate
DataComponentPredicate.ArmorTrim, DataComponentPredicate.AttributeModifierPredicate, DataComponentPredicate.AttributeModifiers, DataComponentPredicate.BundleContents, DataComponentPredicate.Container, DataComponentPredicate.CustomData, DataComponentPredicate.Damage, DataComponentPredicate.EnchantmentListPredicate, DataComponentPredicate.Enchantments, DataComponentPredicate.Exists, DataComponentPredicate.FireworkExplosion, DataComponentPredicate.FireworkExplosionPredicate, DataComponentPredicate.Fireworks, DataComponentPredicate.JukeboxPlayable, DataComponentPredicate.Potions, DataComponentPredicate.Registered, DataComponentPredicate.StoredEnchantments, DataComponentPredicate.VillagerVariant, DataComponentPredicate.WritableBook, DataComponentPredicate.WrittenBook -
Constructor Summary
ConstructorsConstructorDescriptionExists(DataComponent<?> component) Creates an instance of aExistsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleantest(DataComponent.Holder holder) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Exists
Creates an instance of aExistsrecord class.- Parameters:
component- the value for thecomponentrecord component
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<DataComponent.Holder>
-
toString
-
hashCode
-
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). -
component
-