Clover Coverage Report - XWiki Commons - Parent POM 4.0-SNAPSHOT (Aggregated)
Coverage timestamp: Mon Mar 12 2012 17:13:48 CET
../../../../../img/srcFileCovDistChart0.png 69% of files have more coverage
4   61   3   1.33
0   21   0.75   3
3     1  
1    
 
  AbstractSearchResult       Line # 28 4 0% 3 7 0% 0.0
 
No Tests
 
1    /*
2    * See the NOTICE file distributed with this work for additional
3    * information regarding copyright ownership.
4    *
5    * This is free software; you can redistribute it and/or modify it
6    * under the terms of the GNU Lesser General Public License as
7    * published by the Free Software Foundation; either version 2.1 of
8    * the License, or (at your option) any later version.
9    *
10    * This software is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    * Lesser General Public License for more details.
14    *
15    * You should have received a copy of the GNU Lesser General Public
16    * License along with this software; if not, write to the Free
17    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19    */
20    package org.xwiki.extension.repository.result;
21   
22    /**
23    * Utility base class for {@link IterableResult} implementations.
24    *
25    * @param <T> the type
26    * @version $Id: 6455f015384e8e8b18ea2f7f58b770201aa53252 $
27    */
 
28    public abstract class AbstractSearchResult<T> implements IterableResult<T>
29    {
30    /**
31    * @see #getTotalHits()
32    */
33    private int totalHits;
34   
35    /**
36    * @see #getOffset()
37    */
38    private int offset;
39   
40    /**
41    * @param totalHits the total number of possible results without offset or maximum results limits
42    * @param offset the index in the total number of possible search result where this extract starts
43    */
 
44  0 toggle public AbstractSearchResult(int totalHits, int offset)
45    {
46  0 this.totalHits = totalHits;
47  0 this.offset = offset;
48    }
49   
 
50  0 toggle @Override
51    public int getTotalHits()
52    {
53  0 return this.totalHits;
54    }
55   
 
56  0 toggle @Override
57    public int getOffset()
58    {
59  0 return this.offset;
60    }
61    }