Record Class EventValueRegistry.Flags
java.lang.Object
java.lang.Record
org.skriptlang.skript.bukkit.lang.eventvalue.EventValueRegistry.Flags
- Record Components:
set- the set of flags
- Enclosing interface:
EventValueRegistry
A set of
EventValueRegistry.Flags.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventValueRegistry.FlagsDefault flags: fall back to default time state and allow conversion.static final EventValueRegistry.FlagsNo flags. -
Constructor Summary
ConstructorsConstructorDescriptionFlags(Set<EventValueRegistry.Flag> set) Creates an instance of aFlagsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanhas(EventValueRegistry.Flag flag) Checks whether a flag is present.final inthashCode()Returns a hash code value for this object.static EventValueRegistry.Flagsof(Collection<EventValueRegistry.Flag> flags) Creates a new flags set from a collection.static EventValueRegistry.Flagsof(EventValueRegistry.Flag... flags) Creates a new flags set from an array.set()Returns the value of thesetrecord component.final StringtoString()Returns a string representation of this record class.with(EventValueRegistry.Flag... flags) Returns a new flags set with the given flags added.without(EventValueRegistry.Flag... flags) Returns a new flags set with the given flags removed.
-
Field Details
-
DEFAULT
Default flags: fall back to default time state and allow conversion. -
NONE
No flags.
-
-
Constructor Details
-
Flags
Creates an instance of aFlagsrecord class.- Parameters:
set- the value for thesetrecord component
-
-
Method Details
-
of
Creates a new flags set from a collection.- Parameters:
flags- the flags to include- Returns:
- a new flags set
-
of
Creates a new flags set from an array.- Parameters:
flags- the flags to include- Returns:
- a new flags set
-
has
Checks whether a flag is present.- Parameters:
flag- the flag to check for- Returns:
trueif the flag is present
-
with
Returns a new flags set with the given flags added.- Parameters:
flags- the flags to add- Returns:
- a new flags set
-
without
Returns a new flags set with the given flags removed.- Parameters:
flags- the flags to remove- Returns:
- a new flags set
-
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). -
set
Returns the value of thesetrecord component.- Returns:
- the value of the
setrecord component
-