org.apache.chemistry.opencmis.client.runtime.util
Class EmptyItemIterable<T>

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.runtime.util.EmptyItemIterable<T>
All Implemented Interfaces:
java.lang.Iterable<T>, ItemIterable<T>

public class EmptyItemIterable<T>
extends java.lang.Object
implements ItemIterable<T>

An empty item iterable.


Nested Class Summary
static class EmptyItemIterable.EmptyIterator<V>
          An empty iterator.
 
Field Summary
static EmptyItemIterable<?> INSTANCE
           
 
Constructor Summary
EmptyItemIterable()
           
 
Method Summary
 boolean getHasMoreItems()
          Returns whether the repository contains additional items beyond the page of items already fetched.
 ItemIterable<T> getPage()
          Gets an iterable for the current sub collection within the CMIS collection using default maximum number of items
 ItemIterable<T> getPage(int maxNumItems)
          Gets an iterable for the current sub collection within the CMIS collection
 long getPageNumItems()
          Returns the number of items fetched for the current page.
 long getTotalNumItems()
          Returns the total number of items.
static
<U> EmptyItemIterable<U>
instance()
           
 java.util.Iterator<T> iterator()
           
 ItemIterable<T> skipTo(long position)
          Skip to position within CMIS collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final EmptyItemIterable<?> INSTANCE
Constructor Detail

EmptyItemIterable

public EmptyItemIterable()
Method Detail

instance

public static <U> EmptyItemIterable<U> instance()

skipTo

public ItemIterable<T> skipTo(long position)
Description copied from interface: ItemIterable
Skip to position within CMIS collection

Specified by:
skipTo in interface ItemIterable<T>
Returns:
iterable whose starting point is the specified skip to position. This iterable may be the same as this

getPage

public ItemIterable<T> getPage()
Description copied from interface: ItemIterable
Gets an iterable for the current sub collection within the CMIS collection using default maximum number of items

Specified by:
getPage in interface ItemIterable<T>
Returns:
iterable for current page

getPage

public ItemIterable<T> getPage(int maxNumItems)
Description copied from interface: ItemIterable
Gets an iterable for the current sub collection within the CMIS collection

Specified by:
getPage in interface ItemIterable<T>
Parameters:
maxNumItems - maximum number of items the sub collection will contain
Returns:
iterable for current page

iterator

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

getPageNumItems

public long getPageNumItems()
Description copied from interface: ItemIterable
Returns the number of items fetched for the current page.

Specified by:
getPageNumItems in interface ItemIterable<T>
Returns:
number of items for currently fetched collection

getHasMoreItems

public boolean getHasMoreItems()
Description copied from interface: ItemIterable
Returns whether the repository contains additional items beyond the page of items already fetched.

Specified by:
getHasMoreItems in interface ItemIterable<T>
Returns:
true => further page requests will be made to the repository

getTotalNumItems

public long getTotalNumItems()
Description copied from interface: ItemIterable
Returns the total number of items. If the repository knows the total number of items in a result set, the repository SHOULD include the number here. If the repository does not know the number of items in a result set, this parameter SHOULD not be set. The value in the parameter MAY NOT be accurate the next time the client retrieves the result set or the next page in the result set.

Specified by:
getTotalNumItems in interface ItemIterable<T>
Returns:
total number of items or (-1)


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.