|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.backends.jeb.Longs
public class Longs
This class represents a sorted set of longs. Internally it uses an array that can grow when necessary. A goal of this class is to avoid memory allocations where possible.
Constructor Summary | |
---|---|
Longs()
Construct a new empty set. |
Method Summary | |
---|---|
boolean |
add(long v)
Add a new value to the set. |
void |
addAll(Longs that)
Adds all the elements of a provided set to this set if they are not already present. |
void |
clear()
Clears the set leaving it empty. |
void |
decode(java.io.DataInputStream dataInputStream)
Decode a value from a data input stream. |
void |
deleteAll(Longs that)
Deletes all the elements of a provided set from this set if they are present. |
int |
encodedSize()
Get the number of bytes needed to encode this value into a byte array. |
int |
size()
Return the number of elements in the set. |
long[] |
toArray()
Convert the set to a new array of longs. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Longs()
Method Detail |
---|
public int encodedSize()
public boolean add(long v)
v
- The value to be added.
public void addAll(Longs that)
that
- The set of elements to be added.public void deleteAll(Longs that)
that
- The set of elements to be deleted.public int size()
public void decode(java.io.DataInputStream dataInputStream) throws java.io.IOException
dataInputStream
- The data input stream to read the value from.
java.io.IOException
- If an I/O error occurs while reading the value.public void clear()
public long[] toArray()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |