public abstract class

PaginatedIterable

extends AbstractCollection<E>
implements Iterable<T>
java.lang.Object
   ↳ java.util.AbstractCollection<E>
     ↳ org.mule.module.hbase.api.impl.PaginatedIterable<T, Page>

Class Overview

Warning: this class is not a proper collection, just it implements it in order to be compatible with some mule's collection splitting

Summary

Fields
private static Logger logger
Public Constructors
PaginatedIterable()
Public Methods
Iterator<T> iterator()
int size()
Object[] toArray()
Hack for enabling collection splitter to work, which forces evaluation of whole iterable.
String toString()
Same impl that those found in Object, in order to avoid eager elements consumption
Protected Methods
abstract Page firstPage()
Answers the first page of the paginated result
abstract boolean hasNextPage(Page page)
Answers if the given page is not the last one
abstract Page nextPage(Page currentPage)
Given a page, answers the next page
abstract Iterator<T> pageIterator(Page page)
Answers an iterator for the current page
[Expand]
Inherited Methods
From class java.util.AbstractCollection
From class java.lang.Object
From interface java.lang.Iterable
From interface java.util.Collection

Fields

private static Logger logger

Public Constructors

public PaginatedIterable ()

Public Methods

public Iterator<T> iterator ()

public int size ()

public Object[] toArray ()

Hack for enabling collection splitter to work, which forces evaluation of whole iterable. This will not work with huge lists, but there is no better solution

public String toString ()

Same impl that those found in Object, in order to avoid eager elements consumption

Protected Methods

protected abstract Page firstPage ()

Answers the first page of the paginated result

protected abstract boolean hasNextPage (Page page)

Answers if the given page is not the last one

Parameters
page
Returns
  • if current page is the last one or not

protected abstract Page nextPage (Page currentPage)

Given a page, answers the next page

Parameters
currentPage
Returns
  • the next page

protected abstract Iterator<T> pageIterator (Page page)

Answers an iterator for the current page

Parameters
page
Returns
  • the givne page iterator