Constructor and Description |
---|
EntryIDSet()
Create a new undefined set.
|
EntryIDSet(byte[] keyBytes,
byte[] bytes)
Create a new entry ID set from the raw database value.
|
EntryIDSet(org.forgerock.opendj.ldap.ByteString keyBytes,
org.forgerock.opendj.ldap.ByteString bytes)
Create a new entry ID set from the raw database value.
|
EntryIDSet(long size)
Create a new undefined set with a initial size.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Iterator<EntryID> |
iterator()
Create an iterator over the set or an empty iterator
if the set is not defined.
|
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.
|
String |
toString()
Get a string representation of this object.
|
void |
toString(StringBuilder buffer)
Convert to a short string to aid with debugging.
|
static EntryIDSet |
unionOfSets(ArrayList<EntryIDSet> sets,
boolean allowDuplicates)
Create a new set of entry IDs that is the union of several entry ID sets.
|
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.public EntryIDSet(org.forgerock.opendj.ldap.ByteString keyBytes, org.forgerock.opendj.ldap.ByteString bytes)
keyBytes
- The database key that contains this value.bytes
- The database value, or null if there are no entry IDs.public static EntryIDSet unionOfSets(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 void toString(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 removedpublic 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 Iterator<EntryID> iterator()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.