net.percederberg.mibble.value
Class BitSetValue

java.lang.Object
  extended bynet.percederberg.mibble.value.BitSetValue
All Implemented Interfaces:
MibValue

public class BitSetValue
extends java.lang.Object
implements MibValue

A bit set MIB value.

Since:
2.0

Constructor Summary
BitSetValue(java.util.BitSet value)
          Creates a new bit set MIB value.
BitSetValue(java.util.BitSet value, java.util.ArrayList references)
          Creates a new bit set MIB value.
 
Method Summary
 java.util.ArrayList getBits()
          Returns all the bits in this bit set as individual number values.
 MibValue initialize(MibLoaderLog log)
          Initializes the MIB value.
 java.lang.Object toObject()
          Returns a Java BitSet representation of this value.
 java.lang.String toString()
          Returns a string representation of this value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitSetValue

public BitSetValue(java.util.BitSet value)
Creates a new bit set MIB value.

Parameters:
value - the bit set value

BitSetValue

public BitSetValue(java.util.BitSet value,
                   java.util.ArrayList references)
Creates a new bit set MIB value.

Parameters:
value - the bit set value
references - the additional referenced bit values
Method Detail

initialize

public MibValue initialize(MibLoaderLog log)
                    throws MibException
Initializes the MIB value. This will remove all levels of indirection present, such as references to other values, and returns the basic value. No value information is lost by this operation. This method may modify this object as a side-effect, and will be called by the MIB loader.

Specified by:
initialize in interface MibValue
Parameters:
log - the MIB loader log
Returns:
the basic MIB value
Throws:
MibException - if an error was encountered during the initialization

getBits

public java.util.ArrayList getBits()
Returns all the bits in this bit set as individual number values.

Returns:
the number values for all bits in this bit set

toObject

public java.lang.Object toObject()
Returns a Java BitSet representation of this value.

Specified by:
toObject in interface MibValue
Returns:
a Java BitSet representation of this value

toString

public java.lang.String toString()
Returns a string representation of this value.

Returns:
a string representation of this value