Class NumericFlags

    • Field Detail

      • NONE

        public static final NumericFlags NONE
        The empty set of numeric flags.
    • Method Detail

      • value

        protected NumericFlags value​(int bits)
        Description copied from class: Flags
        Get 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:
        value in class Flags<NumericFlag,​NumericFlags>
        Parameters:
        bits - the bit combination (possibly with extra bits)
        Returns:
        the set instance
      • castItemOrNull

        protected NumericFlag castItemOrNull​(java.lang.Object obj)
        Description copied from class: Flags
        Get the item (cast to the correct enum type), or null if it is not of the correct type.
        Specified by:
        castItemOrNull in class Flags<NumericFlag,​NumericFlags>
        Parameters:
        obj - the object to cast
        Returns:
        the cast object, or null
      • castThis

        protected NumericFlags castThis​(java.lang.Object obj)
        Description copied from class: Flags
        Cast the given object to this class, throwing an exception if the cast fails.
        Specified by:
        castThis in class Flags<NumericFlag,​NumericFlags>
        Parameters:
        obj - the object to cast
        Returns:
        the cast object
      • forbidAll

        public final void forbidAll()
      • forbidAllBut

        public final void forbidAllBut​(E flag)
      • forbid

        public void forbid​(E flag)