E - The type of the entries.@ThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) public final class SynchronizedOutputShop<E extends Entry> extends DecoratingOutputShop<E,OutputShop<E>>
SynchronizedInputShopdelegate| Constructor and Description |
|---|
SynchronizedOutputShop(OutputShop<E> output)
Constructs a concurrent output shop.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
OutputShop<E> |
getDelegate()
Returns the decorated output shop.
|
E |
getEntry(String name)
Returns the entry for the given
name or
null if no entry with this name exists in this container. |
OutputSocket<? extends E> |
getOutputSocket(E entry)
Returns an output socket for writing to the given entry.
|
int |
getSize()
Returns the number of entries in this container.
|
Iterator<E> |
iterator()
Returns a new iterator for all entries in this container.
|
toStringpublic SynchronizedOutputShop(OutputShop<E> output)
output - the shop to decorate.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DecoratingOutputShop<E extends Entry,OutputShop<E extends Entry>>IOExceptionpublic OutputShop<E> getDelegate()
public E getEntry(String name)
EntryContainername or
null if no entry with this name exists in this container.getEntry in interface EntryContainer<E extends Entry>getEntry in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>name - an entry name.name or
null if no entry with this name exists in this container.public final OutputSocket<? extends E> getOutputSocket(E entry)
OutputServicegetOutputSocket in interface OutputService<E extends Entry>getOutputSocket in class DecoratingOutputShop<E extends Entry,OutputShop<E extends Entry>>entry - the entry, which will be the
local target of the returned
output socket.public int getSize()
EntryContainergetSize in interface EntryContainer<E extends Entry>getSize in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>public Iterator<E> iterator()
EntryContainerFirst, 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.
iterator in interface EntryContainer<E extends Entry>iterator in interface Iterable<E extends Entry>iterator in class DecoratingEntryContainer<E extends Entry,OutputShop<E extends Entry>>Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.