|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.instance.model.impl.FilteredInstanceCollection
public class FilteredInstanceCollection
Instance collection that wraps an instance collection and represents a
selection that contains the instances matching a given Filter
.
Nested Class Summary | |
---|---|
class |
FilteredInstanceCollection.FilteredIterator
Filtered resource iterator. |
Field Summary |
---|
Fields inherited from interface eu.esdihumboldt.hale.common.instance.model.InstanceCollection |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
FilteredInstanceCollection(InstanceCollection decoratee,
Filter filter)
Create a filtered instance collection. |
Method Summary | |
---|---|
Instance |
getInstance(InstanceReference reference)
Get the instance referenced by the given reference. |
InstanceReference |
getReference(Instance instance)
Get a reference to an instance that can be used to retrieve the given instance using InstanceResolver.getInstance(InstanceReference) . |
boolean |
hasSize()
States if the collection has a known size. |
boolean |
isEmpty()
States if the collection has no instances. |
ResourceIterator<Instance> |
iterator()
Get an iterator over all instances contained in the collection. |
InstanceCollection |
select(Filter filter)
Select the instances in the collection, matching the given filter. |
int |
size()
Get the collection size if known. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilteredInstanceCollection(InstanceCollection decoratee, Filter filter)
decoratee
- the instance collection to perform the selection onfilter
- the filter representing the selectionMethod Detail |
---|
public ResourceIterator<Instance> iterator()
InstanceCollection
ResourceIterator.close()
).
iterator
in interface InstanceCollection
public boolean hasSize()
InstanceCollection
hasSize
in interface InstanceCollection
public int size()
InstanceCollection
size
in interface InstanceCollection
InstanceCollection.UNKNOWN_SIZE
InstanceCollection.hasSize()
public boolean isEmpty()
InstanceCollection
InstanceCollection.hasSize()
returns false.
isEmpty
in interface InstanceCollection
public InstanceCollection select(Filter filter)
InstanceCollection
select
in interface InstanceCollection
filter
- the instance filter
public InstanceReference getReference(Instance instance)
InstanceResolver
InstanceResolver.getInstance(InstanceReference)
.
getReference
in interface InstanceResolver
instance
- the instance, must have originated from this resolver
public Instance getInstance(InstanceReference reference)
InstanceResolver
getInstance
in interface InstanceResolver
reference
- the instance reference
null
if it does not exist
or the reference is invalid
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |