jgroup.util
Class BooleanSet

java.lang.Object
  extended by jgroup.util.BooleanSet

public class BooleanSet
extends java.lang.Object

The BooleanSet class implements a set through an array of bits.

Since:
Jgroup 1.2
Author:
Alberto Montresor, Salvatore Cammarata

Constructor Summary
BooleanSet(int size)
          Builds an empty bit set
 
Method Summary
 void clear()
          Clear the bit set
 int lastIndex()
          Return the capacity of the bit set
 boolean lookup(int index)
          Get the i-th element
 void set(int index)
          Set the i-th element to true
 int size()
          Return the number of elements set to true
 java.lang.String toString()
          Returns a string representation of this object
 void unset(int index)
          Set the i-th element to false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanSet

public BooleanSet(int size)
Builds an empty bit set

Method Detail

set

public void set(int index)
Set the i-th element to true


unset

public void unset(int index)
Set the i-th element to false


lookup

public boolean lookup(int index)
Get the i-th element


size

public int size()
Return the number of elements set to true


lastIndex

public int lastIndex()
Return the capacity of the bit set


clear

public void clear()
Clear the bit set


toString

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

Overrides:
toString in class java.lang.Object


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.