public class AssetPagingIterator extends AssetPropertyBase implements Iterator<AssetPropertyBase>
| Modifier and Type | Field and Description |
|---|---|
protected List<AssetPropertyBase> |
cachedElementList |
protected int |
cachedElementPointer |
protected int |
cachedElementStart |
protected AssetPropertyIteratorBase |
iterator |
protected int |
maxCacheSize |
protected int |
totalElementCount |
parentAsset| Constructor and Description |
|---|
AssetPagingIterator(AssetDescriptor parentAsset,
AssetPropertyIteratorBase iterator,
AssetPagingIterator templateIterator)
Copy/clone constructor.
|
AssetPagingIterator(AssetDescriptor parentAsset,
AssetPropertyIteratorBase iterator,
int totalElementCount,
int maxCacheSize)
Typical Constructor creates an iterator with the supplied list of comments.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getElementCount()
Return the number of elements in the list.
|
boolean |
hasNext()
The iterator can only be used once to step through the elements.
|
AssetPropertyBase |
next()
Return the next element in the list
|
void |
remove()
Remove the current element in the iterator.
|
String |
toString()
Standard toString method.
|
equals, getParentAsset, getParentAssetName, getParentAssetTypeName, hashCodeclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEachRemainingprotected int maxCacheSize
protected int totalElementCount
protected int cachedElementStart
protected List<AssetPropertyBase> cachedElementList
protected int cachedElementPointer
protected AssetPropertyIteratorBase iterator
public AssetPagingIterator(AssetDescriptor parentAsset, AssetPropertyIteratorBase iterator, int totalElementCount, int maxCacheSize)
parentAsset - descriptor of parent asset.iterator - type-specific iterator that wraps this paging iterator.totalElementCount - the total number of elements to process. A negative value is converted to 0.maxCacheSize - maximum number of elements that should be retrieved from the property server and
cached in the element list at any one time. If a number less than one is supplied, 1 is used.public AssetPagingIterator(AssetDescriptor parentAsset, AssetPropertyIteratorBase iterator, AssetPagingIterator templateIterator)
parentAsset - descriptor of parent assetiterator - type-specific iterator that wraps this paging iterator.templateIterator - template to copy; null to create an empty iteratorpublic boolean hasNext()
hasNext in interface Iterator<AssetPropertyBase>public AssetPropertyBase next()
next in interface Iterator<AssetPropertyBase>OCFRuntimeException - if there are no more elements in the list or there are problems retrieving
elements from the property (metadata) server.public int getElementCount()
public void remove()
remove in interface Iterator<AssetPropertyBase>Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.