org.xwiki.extension.repository.result
Class CollectionIterableResult<T>

java.lang.Object
  extended by org.xwiki.extension.repository.result.AbstractSearchResult<T>
      extended by org.xwiki.extension.repository.result.CollectionIterableResult<T>
Type Parameters:
T - the type
All Implemented Interfaces:
Iterable<T>, IterableResult<T>

public class CollectionIterableResult<T>
extends AbstractSearchResult<T>

A simple collection based IterableResult.

Since:
4.0M1
Version:
$Id: 8495413f701f76556b373735bddef291e4d0fa92 $

Constructor Summary
CollectionIterableResult(int totalHits, int offset, Collection<T> result)
           
 
Method Summary
 int getSize()
           
 Iterator<T> iterator()
           
 
Methods inherited from class org.xwiki.extension.repository.result.AbstractSearchResult
getOffset, getTotalHits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionIterableResult

public CollectionIterableResult(int totalHits,
                                int offset,
                                Collection<T> result)
Parameters:
totalHits - the total number of possible results without offset or maximum results limits
offset - the index in the total number of possible search result where this extract starts
result - the actual results
Method Detail

iterator

public Iterator<T> iterator()

getSize

public int getSize()
Returns:
the number of found extensions


Copyright © 2004-2013 XWiki. All Rights Reserved.