Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.api.repository.cache
Class CachingDocumentIterator

java.lang.Object
  extended by org.nuxeo.ecm.core.api.repository.cache.CachingDocumentIterator
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable<DocumentModel>, java.util.Iterator<DocumentModel>, DocumentModelIterator

public class CachingDocumentIterator
extends java.lang.Object
implements DocumentModelIterator

Author:
Bogdan Stefanescu
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.nuxeo.ecm.core.api.DocumentModelIterator
UNKNOWN_SIZE
 
Constructor Summary
CachingDocumentIterator(DocumentModelCache cache, DocumentModelIterator it)
           
 
Method Summary
 boolean hasNext()
           
 java.util.Iterator<DocumentModel> iterator()
           
 DocumentModel next()
           
 void remove()
           
 long size()
          This might return a real elements count if the implementation allow this.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingDocumentIterator

public CachingDocumentIterator(DocumentModelCache cache,
                               DocumentModelIterator it)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<DocumentModel>

next

public DocumentModel next()
Specified by:
next in interface java.util.Iterator<DocumentModel>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<DocumentModel>

iterator

public java.util.Iterator<DocumentModel> iterator()
Specified by:
iterator in interface java.lang.Iterable<DocumentModel>

size

public long size()
Description copied from interface: DocumentModelIterator
This might return a real elements count if the implementation allow this.

Specified by:
size in interface DocumentModelIterator
Returns:
the number of elements or -1 (by convention) if it is unknown

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.