FileDocCategorySizeDatePackage
Page.javaAPI DocJBoss 4.2.11487Fri Jul 13 20:56:00 BST 2007xpetstore.util

Page

public class Page extends Object implements Serializable
author
Herve Tchepannou

Fields Summary
public static final Page
EMPTY_PAGE
Collection
list
int
start
boolean
hasNext
Constructors Summary
public Page(Collection col, int start, boolean hasNext)


    //~ Constructors -----------------------------------------------------------

       
                         
                      
    
        this.list    = new ArrayList( col );
        this.start   = start;
        this.hasNext = hasNext;
    
Methods Summary
public java.util.CollectiongetList()

        return list;
    
public intgetSize()

        return list.size(  );
    
public intgetStartOfNextPage()

        return start + list.size(  );
    
public intgetStartOfPreviousPage()

        return Math.max( start - list.size(  ), 0 );
    
public booleanisNextPageAvailable()

        return hasNext;
    
public booleanisPreviousPageAvailable()

        return start > 0;