Package org.wildfly.common.format
Class GeneralFlags
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.wildfly.common.flags.Flags<E,This>
org.wildfly.common.format.GeneralFlags
- All Implemented Interfaces:
Iterable<GeneralFlag>,Collection<GeneralFlag>,Set<GeneralFlag>,SortedSet<GeneralFlag>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected GeneralFlagcastItemOrNull(Object obj) Get the item (cast to the correctenumtype), ornullif it is not of the correct type.protected GeneralFlagsCast the given object to this class, throwing an exception if the cast fails.voidforbid(GeneralFlag flag) final voidfinal voidforbidAllBut(GeneralFlag flag) protected GeneralFlagitemOf(int index) Get the flag item with the given index.static GeneralFlagsof(GeneralFlag flag) static GeneralFlagsof(GeneralFlag flag1, GeneralFlag flag2) static GeneralFlagsof(GeneralFlag flag1, GeneralFlag flag2, GeneralFlag flag3) protected GeneralFlagsthis_()Returnthis.protected GeneralFlagsvalue(int bits) Get the set value of the given bit combination.Methods inherited from class org.wildfly.common.flags.Flags
comparator, complement, contains, contains, containsAll, containsAll, containsAll, containsAll, containsAny, containsAny, containsAny, descendingIterator, equals, equals, equals, first, forEach, hashCode, headSet, isEmpty, iterator, last, size, subSet, tailSet, toArray, toArray, toString, with, with, with, with, with, without, withoutMethods inherited from class java.util.AbstractSet
removeAllMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.SortedSet
spliterator
-
Field Details
-
NONE
The empty set of general flags.
-
-
Method Details
-
of
-
of
-
of
-
this_
Description copied from class:FlagsReturnthis.- Specified by:
this_in classFlags<GeneralFlag,GeneralFlags> - Returns:
this
-
value
Description copied from class:FlagsGet the set value of the given bit combination. The bit combination may contain extraneous one-bits so any bits beyond the bit of the last flag should be masked off if an array is used for lookup.- Specified by:
valuein classFlags<GeneralFlag,GeneralFlags> - Parameters:
bits- the bit combination (possibly with extra bits)- Returns:
- the set instance
-
itemOf
Description copied from class:FlagsGet the flag item with the given index.- Specified by:
itemOfin classFlags<GeneralFlag,GeneralFlags> - Parameters:
index- the index- Returns:
- the flag
-
castItemOrNull
Description copied from class:FlagsGet the item (cast to the correctenumtype), ornullif it is not of the correct type.- Specified by:
castItemOrNullin classFlags<GeneralFlag,GeneralFlags> - Parameters:
obj- the object to cast- Returns:
- the cast object, or
null
-
castThis
Description copied from class:FlagsCast the given object to this class, throwing an exception if the cast fails.- Specified by:
castThisin classFlags<GeneralFlag,GeneralFlags> - Parameters:
obj- the object to cast- Returns:
- the cast object
-
forbidAll
public final void forbidAll() -
forbidAllBut
-
forbid
-