de.rwth.domains.templates
Class BitVectorElement

java.lang.Object
  |
  +--de.rwth.domains.templates.BitVectorElement

public class BitVectorElement
extends java.lang.Object

Representation of the elements of BitVectorLattice

Version:
$Id: BitVectorElement.java,v 1.3 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Field Summary
protected  java.util.BitSet bitSet
          The actual implementation.
protected  int n
          The fixed length of this element.
 
Constructor Summary
BitVectorElement(int n)
          Creates a new BitVectorElement instance where all bits a set to zero.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean get(int index)
          Gets the specified bit.
 java.util.BitSet getBitSet()
          Returns a bitSet representation of this element.
 int size()
          Returns the length of this bit vector.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

n

protected int n
The fixed length of this element.

bitSet

protected java.util.BitSet bitSet
The actual implementation. Always has n bits.
Constructor Detail

BitVectorElement

public BitVectorElement(int n)
Creates a new BitVectorElement instance where all bits a set to zero.
Parameters:
n - an int value
Method Detail

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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

get

public boolean get(int index)
Gets the specified bit.
Parameters:
index - an int value
Returns:
a boolean value

size

public int size()
Returns the length of this bit vector.
Returns:
an int value

getBitSet

public java.util.BitSet getBitSet()
Returns a bitSet representation of this element.
Returns:
a BitSet value