psdi.util

Class BitFlag

  • java.lang.Object
    • psdi.util.BitFlag
  • All Implemented Interfaces:
    java.io.Serializable


    public class BitFlag
    extends java.lang.Object
    implements java.io.Serializable
    Flags represented by bits in a long.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      BitFlag()
      Standard constructor
      BitFlag(long flags)
      Construct a flag with the specified setting
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      long getFlags()
      Return all the flags
      boolean isFlagSet(long flag)
      Return the state of the specified flag
      BitFlag or(BitFlag second)
      Combining two bit flags using or logic.
      void setFlag(long flag, boolean state)
      Set the specified flag on or off
      void setFlags(long flag)
      Set the flag to the specified values)
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BitFlag

        public BitFlag()
        Standard constructor
      • BitFlag

        public BitFlag(long flags)
        Construct a flag with the specified setting
    • Method Detail

      • setFlags

        public void setFlags(long flag)
        Set the flag to the specified values)
      • getFlags

        public long getFlags()
        Return all the flags
      • setFlag

        public void setFlag(long flag,
                            boolean state)
        Set the specified flag on or off
      • isFlagSet

        public boolean isFlagSet(long flag)
        Return the state of the specified flag
      • or

        public BitFlag or(BitFlag second)
        Combining two bit flags using or logic. Returns a new BigFlag object. The original one is not modified
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object