TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.entry
Interface EntryContainer<E extends Entry>

Type Parameters:
E - The type of the entries.
All Superinterfaces:
Iterable<E>
All Known Subinterfaces:
InputService<E>, InputShop<E>, OutputService<E>, OutputShop<E>
All Known Implementing Classes:
ConcurrentInputShop, ConcurrentOutputShop, DecoratingEntryContainer, DecoratingInputShop, DecoratingOutputShop, FsArchiveFileSystem, FsDefaultArchiveController.DummyInputService, FsDefaultArchiveController.Input, FsDefaultArchiveController.Output, FsMultiplexedArchiveOutputShop, FsReadOnlyArchiveFileSystem

public interface EntryContainer<E extends Entry>
extends Iterable<E>

An iterable container for entries.

Author:
Christian Schlichtherle

Method Summary
 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 over all entries in this container.
 

Method Detail

getSize

int getSize()
Returns the number of entries in this container.


iterator

Iterator<E> iterator()
Returns a new iterator over all entries in this container.

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.

Specified by:
iterator in interface Iterable<E extends Entry>
Returns:
A new non-null iterator over all entries in this container.

getEntry

@CheckForNull
E getEntry(@NonNull
                        String name)
Returns the entry for the given name or null if no entry with this name exists in this container.

Parameters:
name - an entry name.
Returns:
The entry for the given name or null if no entry with this name exists in this container.

TrueZIP Kernel 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.