E
- the type of the entries in the container.C
- the type of the entry container.public abstract class DecoratingEntryContainer<E extends Entry,C extends EntryContainer<E>> extends Object implements EntryContainer<E>
Modifier and Type | Field and Description |
---|---|
protected C |
delegate
The decorated entry container.
|
Modifier | Constructor and Description |
---|---|
protected |
DecoratingEntryContainer(C delegate)
Constructs a new filter entry container.
|
Modifier and Type | Method and Description |
---|---|
E |
getEntry(String name)
Returns the entry for the given
name or
null if no entry with this name exists in this container. |
int |
getSize()
Returns the number of entries in this container.
|
Iterator<E> |
iterator()
Returns a new iterator for all entries in this container.
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected final C extends EntryContainer<E> delegate
protected DecoratingEntryContainer(C delegate)
delegate
- the entry container to decorate.@CheckForNull public E getEntry(String name)
EntryContainer
name
or
null
if no entry with this name exists in this container.getEntry
in interface EntryContainer<E extends Entry>
name
- an entry name.name
or
null
if no entry with this name exists in this container.public int getSize()
EntryContainer
getSize
in interface EntryContainer<E extends Entry>
public Iterator<E> iterator()
EntryContainer
First, the iteration must be consistent: Multiple iterators must iterate the same entries in the same order again unless the set of entries has changed.
Next, the iteration should also reflect the natural order of the entries in this container. For example, if this container represents an archive file, the iteration should reflect the natural order of the entries in the archive file.
Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.