| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Page |
|
| 1.0;1 |
| 1 | package org.melati.util; | |
| 2 | /* | |
| 3 | * $Source: /usr/cvsroot/melati/melati/src/site/resources/withWebmacro/org.melati.util.Page.html,v $ | |
| 4 | * $Revision: 1.1 $ | |
| 5 | * | |
| 6 | * Copyright (C) 2003, 2010 Tim Pizey | |
| 7 | * | |
| 8 | * Part of Melati (http://melati.org), a framework for the rapid | |
| 9 | * development of clean, maintainable web applications. | |
| 10 | * | |
| 11 | * Melati is free software; Permission is granted to copy, distribute | |
| 12 | * and/or modify this software under the terms either: | |
| 13 | * | |
| 14 | * a) the GNU General Public License as published by the Free Software | |
| 15 | * Foundation; either version 2 of the License, or (at your option) | |
| 16 | * any later version, | |
| 17 | * | |
| 18 | * or | |
| 19 | * | |
| 20 | * b) any version of the Melati Software License, as published | |
| 21 | * at http://melati.org | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License and | |
| 24 | * the Melati Software License along with this program; | |
| 25 | * if not, write to the Free Software Foundation, Inc., | |
| 26 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA to obtain the | |
| 27 | * GNU General Public License and visit http://melati.org to obtain the | |
| 28 | * Melati Software License. | |
| 29 | * | |
| 30 | * Feel free to contact the Developers of Melati (http://melati.org), | |
| 31 | * if you would like to work out a different arrangement than the options | |
| 32 | * outlined here. It is our intention to allow Melati to be used by as | |
| 33 | * wide an audience as possible. | |
| 34 | * | |
| 35 | * This program is distributed in the hope that it will be useful, | |
| 36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 38 | * GNU General Public License for more details. | |
| 39 | * | |
| 40 | * Contact details for copyright holder: | |
| 41 | * | |
| 42 | * Tim Pizey <timp At paneris.org> | |
| 43 | */ | |
| 44 | ||
| 45 | ||
| 46 | /** | |
| 47 | * A 'screen full' of results. | |
| 48 | */ | |
| 49 | public class Page { | |
| 50 | int number; | |
| 51 | int start; | |
| 52 | ||
| 53 | /** | |
| 54 | * Constructor. | |
| 55 | * @param number page number in collection | |
| 56 | * @param start position in collection of first item on page | |
| 57 | */ | |
| 58 | 24 | public Page(int number, int start) { |
| 59 | 24 | this.number = number; |
| 60 | 24 | this.start = start; |
| 61 | 24 | } |
| 62 | /** | |
| 63 | * @return the page number | |
| 64 | */ | |
| 65 | public int getNumber() { | |
| 66 | 4 | return number; |
| 67 | } | |
| 68 | /** | |
| 69 | * @return the starting position of the page | |
| 70 | */ | |
| 71 | public int getStart() { | |
| 72 | 4 | return start; |
| 73 | } | |
| 74 | } |