Modifier and Type | Class and Description |
---|---|
private class | LazyResourceCollectionWrapper.CachedIterator
Iterator that will put in the shared cache array list the selected resources |
private class |
Modifier and Type | Field and Description |
---|---|
private final List | cachedResources
List of cached resources |
private Iterator | |
private final Supplier |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected Iterator | createIterator()
Implements abstract org. |
protected boolean | Returns: whether the resource should be filtered or notresource considered for filtration r)Specify if the resource should be filtered or not. |
protected int | getSize()
Implements abstract org. |
cachedResources | back to summary |
---|---|
private final List<Resource> cachedResources List of cached resources |
filteringIterator | back to summary |
---|---|
private Iterator<Resource> filteringIterator |
filteringIteratorSupplier | back to summary |
---|---|
private final Supplier<Iterator<Resource>> filteringIteratorSupplier |
LazyResourceCollectionWrapper | back to summary |
---|---|
public LazyResourceCollectionWrapper() |
createIterator | back to summary |
---|---|
protected Iterator Implements abstract org. Doc from org. Do create an iterator on the resource collection. The creation of the iterator is allowed to not be thread safe whereas the iterator itself should. The returned iterator will be wrapped into the FailFast one. |
filterResource | back to summary |
---|---|
protected boolean filterResource(final Resource r) Specify if the resource should be filtered or not. This function should be overridden in order to define the filtering algorithm
|
getSize | back to summary |
---|---|
protected int getSize() Implements abstract org. Doc from org. Do compute the size of the resource collection. The implementation of this function is allowed to be not thread safe.
|
Access | Constructor and Description |
---|---|
public | CachedIterator(final Iterator<Resource>
the iterator which will provide the resources to put in
cache it)Default constructor |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public Resource | |
public void | remove()
Overrides default java. |
cursor | back to summary |
---|---|
pack-priv int cursor |
it | back to summary |
---|---|
private final Iterator<Resource> it |
CachedIterator | back to summary |
---|---|
public CachedIterator(final Iterator<Resource> it) Default constructor |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public Resource next() Implements java. Doc from java. Returns the next element in the iteration. |
remove | back to summary |
---|---|
public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
|
Modifier and Type | Field and Description |
---|---|
pack-priv boolean | |
protected final Iterator | |
pack-priv Resource |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public Resource |
ended | back to summary |
---|---|
pack-priv boolean ended |
it | back to summary |
---|---|
protected final Iterator<Resource> it |
next | back to summary |
---|---|
pack-priv Resource next |
FilteringIterator | back to summary |
---|---|
pack-priv FilteringIterator(final Iterator<Resource> it) |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public Resource next() Implements java. Doc from java. Returns the next element in the iteration. |