org.melati.util
Class PagedEnumerationBase<T>

Package class diagram package PagedEnumerationBase
java.lang.Object
  extended by org.melati.util.PagedEnumerationBase<T>
All Implemented Interfaces:
Enumeration<T>, PagedEnumeration<T>
Direct Known Subclasses:
CountedDumbPagedEnumeration, DumbPagedEnumeration

public abstract class PagedEnumerationBase<T>
extends Object
implements PagedEnumeration<T>

All the code common to CountedDumbPagedEnumeration and DumbPagedEnumeration.


Constructor Summary
PagedEnumerationBase()
           
 
Method Summary
 int getCurrentPosition()
          
 int getNextPosition()
          
 int getPageEnd()
          
 Vector<Page> getPages()
           
 int getPageSize()
          
 int getPageStart()
          
 Integer getPrevPageStart()
          
 int getTotalCount()
          
 boolean hasMoreElements()
          
 T nextElement()
          
 boolean nextElementOnThisPage()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.melati.util.PagedEnumeration
getNextPageStart
 

Constructor Detail

PagedEnumerationBase

public PagedEnumerationBase()
Method Detail

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration<T>
See Also:
Enumeration.hasMoreElements()

nextElement

public T nextElement()

Specified by:
nextElement in interface Enumeration<T>
See Also:
Enumeration.nextElement()

getPageStart

public int getPageStart()

Specified by:
getPageStart in interface PagedEnumeration<T>
Returns:
the start record of the page, indexed from 1.
See Also:
org.melati.poem.util.PagedEnumeration#getPageStart()

getPageEnd

public int getPageEnd()

Specified by:
getPageEnd in interface PagedEnumeration<T>
Returns:
the end record of the page, indexed from 1.
See Also:
org.melati.poem.util.PagedEnumeration#getPageEnd()

getTotalCount

public int getTotalCount()

Specified by:
getTotalCount in interface PagedEnumeration<T>
Returns:
the total number of items
See Also:
org.melati.poem.util.PagedEnumeration#getTotalCount()

getPrevPageStart

public Integer getPrevPageStart()

Specified by:
getPrevPageStart in interface PagedEnumeration<T>
Returns:
the start record of the previous page, indexed from 1.
See Also:
org.melati.poem.util.PagedEnumeration#getPrevPageStart()

getCurrentPosition

public int getCurrentPosition()

Specified by:
getCurrentPosition in interface PagedEnumeration<T>
Returns:
where we are in the sequence
See Also:
org.melati.poem.util.PagedEnumeration#getCurrentPosition()

getNextPosition

public int getNextPosition()

Specified by:
getNextPosition in interface PagedEnumeration<T>
Returns:
the position of the next element in the sequence
See Also:
org.melati.poem.util.PagedEnumeration#getNextPosition()

nextElementOnThisPage

public boolean nextElementOnThisPage()

Specified by:
nextElementOnThisPage in interface PagedEnumeration<T>
Returns:
whether there are more elements on this page
See Also:
org.melati.poem.util.PagedEnumeration#nextElementOnThisPage()

getPageSize

public int getPageSize()

Specified by:
getPageSize in interface PagedEnumeration<T>
Returns:
the number of elements on a page
See Also:
org.melati.poem.util.PagedEnumeration#getPageSize()

getPages

public Vector<Page> getPages()
Specified by:
getPages in interface PagedEnumeration<T>
Returns:
All Pages


Copyright © 2000-2010 PanEris. All Rights Reserved.