|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object netcom.util.Util
This class contains static utility methods used throughout the program
Constructor Summary | |
Util()
|
Method Summary | |
static int |
cardinality(java.util.BitSet set)
This is a method to implement a java 1.4 method using java 1.3 calls See 1.4 docs for Bitset.cardinality() |
static java.util.Collection |
combineCollections(java.util.Collection first,
java.util.Collection second)
Method to copy two synchronized collections into a unsynchronized Collection which contains pointers to all the objects in the first two collections. |
static java.util.Map |
copyMap(java.util.Map input_map)
Method to copy a syncrhonized Map to a thread-safe, unsyncrhonized copy ie. |
static void |
flip(java.util.BitSet set,
int i)
This is a method to implement a java 1.4 method using java 1.3 calls See 1.4 docs for BitSet.flip() |
static java.lang.String |
getBloomString(java.util.List[] name_list_pairs)
This is a method to ensure the Name-List-Pairs are ALWAYS converted to Strings the SAME WAY (this is crucial for bloom filters) |
static boolean |
isClosed(java.net.Socket s)
It is very important to make sure no one is reading from the Socket s while you call isClosed. |
static int |
nextSetBit(java.util.BitSet set,
int idx)
This is a method to implement a java 1.4 method using java 1.3 calls See 1.4 docs for Bitset.nextSetBit() |
static void |
set(java.util.BitSet set,
int i,
boolean b)
This is a method to implement a java 1.4 method using java 1.3 calls See 1.4 docs for BitSet.set() |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static boolean isClosed(java.net.Socket s)
s
- Socket whose connection we are testing
public static java.util.Collection combineCollections(java.util.Collection first, java.util.Collection second)
first
- the first synchronized collection to be copiedsecond
- the second synchronized collection to be copied
public static java.util.Map copyMap(java.util.Map input_map)
input_map
- the synchronized map to copy out
public static java.lang.String getBloomString(java.util.List[] name_list_pairs)
name_list_pairs
- the List[] with the name-list-pair information
public static void set(java.util.BitSet set, int i, boolean b)
public static void flip(java.util.BitSet set, int i)
public static int cardinality(java.util.BitSet set)
public static int nextSetBit(java.util.BitSet set, int idx)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |