Class ShortBitSet

java.lang.Object
org.jibx.schema.types.ShortBitSet

public class ShortBitSet extends Object
Bit set stored as a short value.
Author:
Dennis M. Sosnoski
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private char
    Mask for values in set.
    private static final char[]
    Array of bit masks.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(int value)
    Include value in set.
    void
    Clear all values.
    boolean
    isSet(int value)
    Check for value in set.
    void
    remove(int value)
    Exclude value from set.
    void
    setRange(int min, int max)
    Set all values in range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • s_bitMasks

      private static final char[] s_bitMasks
      Array of bit masks.
    • m_bits

      private char m_bits
      Mask for values in set.
  • Constructor Details

    • ShortBitSet

      public ShortBitSet()
  • Method Details

    • isSet

      public boolean isSet(int value)
      Check for value in set.
      Parameters:
      value -
      Returns:
      true if in set, false if not
    • add

      public void add(int value)
      Include value in set.
      Parameters:
      value -
    • remove

      public void remove(int value)
      Exclude value from set.
      Parameters:
      value -
    • clear

      public void clear()
      Clear all values.
    • setRange

      public void setRange(int min, int max)
      Set all values in range.
      Parameters:
      min - minimum value in range
      max - maximum value in range