|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.backends.jeb.EntryIDSet
public class EntryIDSet
Represents a set of Entry IDs. It can represent a set where the IDs are not defined, for example when the index entry limit has been exceeded.
Constructor Summary | |
---|---|
EntryIDSet()
Create a new undefined set. |
|
EntryIDSet(byte[] keyBytes,
byte[] bytes)
Create a new entry ID set from the raw database value. |
|
EntryIDSet(long size)
Create a new undefined set with a initial size. |
Method Summary | |
---|---|
boolean |
add(EntryID entryID)
Insert an ID into this set. |
void |
addAll(EntryIDSet that)
Add all the IDs from a given set that are not already present. |
boolean |
contains(EntryID entryID)
Check whether this set of entry IDs contains a given ID. |
void |
deleteAll(EntryIDSet that)
Delete all IDs in this set that are in a given set. |
boolean |
isDefined()
Determine whether this set of IDs is defined. |
java.util.Iterator<EntryID> |
iterator()
Create an iterator over the set or an empty iterator if the set is not defined. |
java.util.Iterator<EntryID> |
iterator(EntryID begin)
Create an iterator over the set or an empty iterator if the set is not defined. |
boolean |
remove(EntryID entryID)
Remove an ID from this set. |
void |
retainAll(EntryIDSet that)
Takes the intersection of this set with another. |
long |
size()
Get the size of this entry ID set. |
byte[] |
toDatabase()
Get a database representation of this object. |
java.lang.String |
toString()
Get a string representation of this object. |
void |
toString(java.lang.StringBuilder buffer)
Convert to a short string to aid with debugging. |
static EntryIDSet |
unionOfSets(java.util.ArrayList<EntryIDSet> sets,
boolean allowDuplicates)
Create a new set of entry IDs that is the union of several entry ID sets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EntryIDSet()
public EntryIDSet(long size)
size
- The undefined size for this set.public EntryIDSet(byte[] keyBytes, byte[] bytes)
keyBytes
- The database key that contains this value.bytes
- The database value, or null if there are no entry IDs.Method Detail |
---|
public static EntryIDSet unionOfSets(java.util.ArrayList<EntryIDSet> sets, boolean allowDuplicates)
sets
- A list of entry ID sets.allowDuplicates
- true if duplicate IDs are allowed in the resulting
set, or if the provided sets are sure not to overlap; false if
duplicates should be eliminated.
public long size()
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The string is appended to this string builder.public boolean isDefined()
public byte[] toDatabase()
public boolean add(EntryID entryID)
entryID
- The ID to be inserted.
public boolean remove(EntryID entryID)
entryID
- The ID to be removed
public boolean contains(EntryID entryID)
entryID
- The ID to be checked.
public void retainAll(EntryIDSet that)
that
- The set of IDs that are to be retained from this object.public void addAll(EntryIDSet that)
that
- The set of IDs to be added. It MUST be definedpublic void deleteAll(EntryIDSet that)
that
- The set of IDs to be deleted. It MUST be defined.public java.util.Iterator<EntryID> iterator()
iterator
in interface java.lang.Iterable<EntryID>
public java.util.Iterator<EntryID> iterator(EntryID begin)
begin
- The entry ID of the first entry to return in the list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |