
public class MaskedDBIDs extends AbstractCollection<DBID> implements DBIDs, Collection<DBID>
| Modifier and Type | Class and Description |
|---|---|
protected class |
MaskedDBIDs.InvItr
Iterator over unset elements.
|
protected class |
MaskedDBIDs.Itr
Iterator over set bits
|
| Modifier and Type | Field and Description |
|---|---|
protected BitSet |
bits
The bitmask used for masking
|
protected ArrayDBIDs |
data
Data storage
|
protected boolean |
inverse
Flag whether to iterator over set or unset values.
|
| Constructor and Description |
|---|
MaskedDBIDs(ArrayDBIDs data,
BitSet bits,
boolean inverse)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(DBID e) |
Collection<DBID> |
asCollection()
Retrieve collection access to the IDs
|
void |
clear() |
Iterator<DBID> |
iterator()
Retrieve Iterator access to the IDs.
|
boolean |
remove(Object o) |
int |
size()
Retrieve the collection / data size.
|
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toStringprotected ArrayDBIDs data
protected BitSet bits
protected boolean inverse
public MaskedDBIDs(ArrayDBIDs data, BitSet bits, boolean inverse)
data - Databits - Bitset to use as maskinverse - Flag to inverse the masking rulepublic Iterator<DBID> iterator()
DBIDspublic Collection<DBID> asCollection()
DBIDsasCollection in interface DBIDspublic int size()
DBIDssize in interface DBIDssize in interface Collection<DBID>size in class AbstractCollection<DBID>public boolean add(DBID e)
add in interface Collection<DBID>add in class AbstractCollection<DBID>public boolean remove(Object o)
remove in interface Collection<DBID>remove in class AbstractCollection<DBID>public void clear()
clear in interface Collection<DBID>clear in class AbstractCollection<DBID>