java.util
Class BitSet
java.lang.Object
|
+--java.util.BitSet
- All Implemented Interfaces:
- Cloneable, java.io.Serializable
- public synchronized class BitSet
- extends Object
- implements Cloneable, java.io.Serializable
BitSet
public BitSet()
BitSet
public BitSet(int)
flip
public void flip(int)
flip
public void flip(int,
int)
set
public void set(int)
set
public void set(int,
boolean)
set
public void set(int,
int)
set
public void set(int,
int,
boolean)
clear
public void clear(int)
clear
public void clear(int,
int)
clear
public void clear()
get
public boolean get(int)
get
public BitSet get(int,
int)
nextSetBit
public int nextSetBit(int)
nextClearBit
public int nextClearBit(int)
length
public int length()
isEmpty
public boolean isEmpty()
intersects
public boolean intersects(BitSet)
cardinality
public int cardinality()
and
public void and(BitSet)
or
public void or(BitSet)
xor
public void xor(BitSet)
andNot
public void andNot(BitSet)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
size
public int size()
equals
public boolean equals(Object)
- Description copied from class:
Object
- Determines if this object is "equal" to another object.
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello");
String t = new String("hello");
if (s.equals(t)) System.out.println("same value");
if (s == t) System.out.println("same string");
- Overrides:
equals
in class Object
- Following copied from class:
java.lang.Object
- Parameters:
is
- the other Object to which this one is compared- Returns:
- true if this Object is equal to
other
clone
public Object clone()
toString
public String toString()
- Overrides:
toString
in class Object