DEFAULTBLOC, size, sizeBloc, sorted| Constructor and Description |
|---|
LongArray(int bloc)
Create a free array of longs
|
LongArray(long[] v)
Create an array of longs initializing with v[]
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long v,
boolean testUnicity)
Add a long.
|
Array |
clone()
Deep copy
|
boolean |
delete(long v)
Delete the first value equals to v
kept the array sorted if required
|
boolean |
delete(long v1,
long v2)
Delete the all values between v1 and v2 (inclusive)
kept the array sorted if required
|
boolean |
deleteBrothers(long me)
Delete three other brothers only if all of them are already present
(apart me)
|
boolean |
equals(Array a)
Equality test
|
int |
find(long v)
Return the index of the first value v.
|
long |
get(int i)
Provide the element i
|
long |
getMem()
Size of the array in bytes
|
int |
getSizeCompressed()
Size of the array in compressed mode
=> consecutive values are memorized as range (2 values)
|
boolean |
intersectRange(long vStart,
long vEnd)
Return true if at least one value of the range [vStart..vEnd] (included)
is found in the array
|
long[] |
seeArray()
Provide the java reference on the array
(real size is provided by getSize() and not by .length)
|
void |
set(int i,
long v)
set the element i
|
void |
sort()
Sort the array (only if required)
|
void |
trim()
Remove the reservation room in the array
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic LongArray(int bloc)
public LongArray(long[] v)
v - initial values of the arraypublic long[] seeArray()
public long get(int i)
Arraypublic void set(int i,
long v)
Arraypublic int getSizeCompressed()
getSizeCompressed in class Arraypublic boolean add(long v,
boolean testUnicity)
public boolean delete(long v)
public boolean delete(long v1,
long v2)
public boolean deleteBrothers(long me)
deleteBrothers in class Arraypublic int find(long v)
public boolean intersectRange(long vStart,
long vEnd)
intersectRange in class ArrayvStart - range starting valuevEnd - range ending value