Package org.xwiki.extension.wrap
Class WrappingIterableResult<E extends Extension>
- java.lang.Object
-
- org.xwiki.script.wrap.AbstractWrappingObject<T>
-
- org.xwiki.script.internal.safe.AbstractSafeObject<IterableResult<E>>
-
- org.xwiki.extension.wrap.WrappingIterableResult<E>
-
- Type Parameters:
E
- the extension type
- All Implemented Interfaces:
Iterable<E>
,IterableResult<E>
public class WrappingIterableResult<E extends Extension> extends org.xwiki.script.internal.safe.AbstractSafeObject<IterableResult<E>> implements IterableResult<E>
Provide a public script access to a iterable result.- Since:
- 4.0M2
- Version:
- $Id: b83b4a300bacdfdffe1c1a35283666fa3b896954 $
-
-
Constructor Summary
Constructors Constructor Description WrappingIterableResult(IterableResult<E> result, org.xwiki.script.internal.safe.ScriptSafeProvider<?> safeProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getOffset()
int
getSize()
int
getTotalHits()
Iterator<E>
iterator()
-
Methods inherited from class org.xwiki.script.wrap.AbstractWrappingObject
equals, getWrapped, hashCode, resolveWrapped, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
WrappingIterableResult
public WrappingIterableResult(IterableResult<E> result, org.xwiki.script.internal.safe.ScriptSafeProvider<?> safeProvider)
- Parameters:
result
- the wrapped resultsafeProvider
- the provider of instances safe for public scripts
-
-
Method Detail
-
getTotalHits
public int getTotalHits()
- Specified by:
getTotalHits
in interfaceIterableResult<E extends Extension>
- Returns:
- the total number of possible results without offset or maximum results limits
-
getOffset
public int getOffset()
- Specified by:
getOffset
in interfaceIterableResult<E extends Extension>
- Returns:
- the index in the total number of possible search result where this extract starts
-
getSize
public int getSize()
- Specified by:
getSize
in interfaceIterableResult<E extends Extension>
- Returns:
- the number of found extensions
-
-