uk.ed.inf.bitstring
Class BitString

java.lang.Object
  extended by uk.ed.inf.bitstring.BitString
All Implemented Interfaces:
IBitString

public class BitString
extends java.lang.Object
implements IBitString


Constructor Summary
BitString()
           
BitString(java.util.BitSet rep)
           
BitString(BitString other)
           
BitString(int vectorSize)
           
 
Method Summary
 IBitString and(BitString set)
           
 IBitString andNot(BitString set)
           
 int cardinality()
           
 boolean equals(java.lang.Object obj)
           
 boolean get(int bitIndex)
           
 IBitString get(int fromIndex, int toIndex)
           
 int hashCode()
           
 boolean intersects(BitString set)
           
 boolean isEmpty()
           
 int length()
           
 int nextClearBit(int fromIndex)
           
 int nextSetBit(int fromIndex)
           
 IBitString or(BitString set)
           
 int size()
           
 boolean[] toArray()
           
 boolean[] toArray(boolean[] a)
           
 java.lang.String toString()
           
 IBitString xor(BitString set)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitString

BitString()

BitString

BitString(int vectorSize)

BitString

BitString(BitString other)

BitString

BitString(java.util.BitSet rep)
Method Detail

and

public IBitString and(BitString set)
Specified by:
and in interface IBitString

andNot

public IBitString andNot(BitString set)
Specified by:
andNot in interface IBitString

cardinality

public int cardinality()
Specified by:
cardinality in interface IBitString

get

public IBitString get(int fromIndex,
                      int toIndex)
Specified by:
get in interface IBitString

get

public boolean get(int bitIndex)
Specified by:
get in interface IBitString

hashCode

public int hashCode()
Specified by:
hashCode in interface IBitString
Overrides:
hashCode in class java.lang.Object

intersects

public boolean intersects(BitString set)
Specified by:
intersects in interface IBitString

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface IBitString

length

public int length()
Specified by:
length in interface IBitString

nextClearBit

public int nextClearBit(int fromIndex)

nextSetBit

public int nextSetBit(int fromIndex)

or

public IBitString or(BitString set)
Specified by:
or in interface IBitString

size

public int size()
Specified by:
size in interface IBitString

toString

public java.lang.String toString()
Specified by:
toString in interface IBitString
Overrides:
toString in class java.lang.Object

xor

public IBitString xor(BitString set)
Specified by:
xor in interface IBitString

toArray

public boolean[] toArray()
Specified by:
toArray in interface IBitString

toArray

public boolean[] toArray(boolean[] a)
Specified by:
toArray in interface IBitString

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface IBitString
Overrides:
equals in class java.lang.Object