Package org.apache.sis.storage.geotiff
Class GeoTiffStore.Components
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
org.apache.sis.internal.util.ListOfUnknownSize<GridCoverageResource>
org.apache.sis.storage.geotiff.GeoTiffStore.Components
- All Implemented Interfaces:
Iterable<GridCoverageResource>,Collection<GridCoverageResource>,List<GridCoverageResource>
- Enclosing class:
- GeoTiffStore
The components returned by
GeoTiffStore.components. Defined as a named class instead of an anonymous
class for more readable stack trace. This is especially useful since BackingStoreException
may happen in any method.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intThe collection size, cached when first computed.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanexists(int index) Returns whether the given index is valid.get(int index) Returns element at the given index or throwIndexOutOfBoundsException.private GridCoverageResourcegetImageFileDirectory(int index) Returns element at the given index or returnsnullif the index is invalid.intsize()Returns the size, computing and caching it if needed.protected intReturns the size or -1 if not yet known.Methods inherited from class org.apache.sis.internal.util.ListOfUnknownSize
equals, isEmpty, listIterator, removeAll, spliterator, toArray, toArrayMethods inherited from class java.util.AbstractList
add, clear, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, retainAll, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.List
addAll, contains, containsAll, remove, replaceAll, retainAll, sort
-
Field Details
-
size
private int sizeThe collection size, cached when first computed.
-
-
Constructor Details
-
Components
private Components()
-
-
Method Details
-
sizeIfKnown
protected int sizeIfKnown()Returns the size or -1 if not yet known.- Overrides:
sizeIfKnownin classListOfUnknownSize<GridCoverageResource>- Returns:
ListOfUnknownSize.size()if its value is already known, or any negative value if it still costly to compute.
-
size
public int size()Returns the size, computing and caching it if needed.- Specified by:
sizein interfaceCollection<GridCoverageResource>- Specified by:
sizein interfaceList<GridCoverageResource>- Overrides:
sizein classListOfUnknownSize<GridCoverageResource>- Returns:
- the number of elements in this list.
-
exists
protected boolean exists(int index) Returns whether the given index is valid.- Specified by:
existsin classListOfUnknownSize<GridCoverageResource>- Parameters:
index- the index where to verify if an element exists.- Returns:
trueif an element exists at the given index.
-
get
Returns element at the given index or throwIndexOutOfBoundsException.- Specified by:
getin interfaceList<GridCoverageResource>- Specified by:
getin classListOfUnknownSize<GridCoverageResource>- Parameters:
index- position of the element to get in this list.- Returns:
- the element at the given index.
-
getImageFileDirectory
Returns element at the given index or returnsnullif the index is invalid.
-