|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.util.Utilities
Provides utility methods like checking set intersection etc.
Constructor Summary | |
Utilities()
|
Method Summary | |
static void |
fill(byte[] array,
int start,
int stop,
byte value)
An optimized replacement for Arrays.fill that takes advantage of System.arraycopy. |
static void |
fill(int[] array,
int start,
int stop,
int value)
An optimized replacement for Arrays.fill that takes advantage of System.arraycopy. |
static boolean |
hasIntersection(java.util.Set set1,
java.util.Set set2)
Determines if two sets have non-void intersection |
static byte |
log2(int num)
Returns the based 2 logarithm of num. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utilities()
Method Detail |
public static boolean hasIntersection(java.util.Set set1, java.util.Set set2)
set1
- First setset2
- Second set
public static void fill(int[] array, int start, int stop, int value)
array
- the array to fillstart
- the starting offset, inclusivestop
- the stop offset+1. MUST be greater than start; this differs
from Arrays.fill.value
- the value to write into the arraypublic static void fill(byte[] array, int start, int stop, byte value)
array
- the array to fillstart
- the starting offset, inclusivestop
- the stop offset+1. MUST be greater than start; this differs
from Arrays.fill.value
- the value to write into the arraypublic static byte log2(int num)
num
- MUST be a power of 2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |