1 /*
2 * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18 /*
19 * PagedResults.java
20 *
21 * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
22 * Created: 9/28/12 10:32 AM
23 *
24 */
25 package org.rundeck.api.util;
26
27 import java.util.List;
28
29
30 /**
31 * PagedResults contains a List of a certain type, and paging information.
32 *
33 * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
34 */
35 public interface PagedResults<T> extends Iterable<T>{
36 /**
37 * Max number of items returned in page
38 */
39 public int getMax();
40
41 /**
42 * Offset into all items
43 */
44 public int getOffset();
45
46 /**
47 * Total items to be paged
48 */
49 public int getTotal();
50
51 /**
52 * Number of items available in page
53 */
54 public int getCount();
55
56 /**
57 * Results list
58 */
59 public List<T> getResults();
60 }