Coverage Report - org.apache.shindig.social.opensocial.spi.RestfulCollection
 
Classes in this File Line Coverage Branch Coverage Complexity
RestfulCollection
79%
22/28
N/A
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements. See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership. The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License. You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied. See the License for the
 16  
  * specific language governing permissions and limitations under the License.
 17  
  */
 18  
 package org.apache.shindig.social.opensocial.spi;
 19  
 
 20  
 import java.util.List;
 21  
 
 22  
 public class RestfulCollection<T> {
 23  
   private List<T> entry;
 24  
   private int startIndex;
 25  
   private int totalResults;
 26  
 
 27  27
   private boolean filtered = true;
 28  27
   private boolean sorted = true;
 29  27
   private boolean updatedSince = true;
 30  
 
 31  
   public RestfulCollection(List<T> entry) {
 32  18
     this(entry, 0, entry.size());
 33  18
   }
 34  
 
 35  27
   public RestfulCollection(List<T> entry, int startIndex, int totalResults) {
 36  27
     this.entry = entry;
 37  27
     this.startIndex = startIndex;
 38  27
     this.totalResults = totalResults;
 39  27
   }
 40  
 
 41  
   public List<T> getEntry() {
 42  19
     return entry;
 43  
   }
 44  
 
 45  
   public void setEntry(List<T> entry) {
 46  1
     this.entry = entry;
 47  1
   }
 48  
 
 49  
   public int getStartIndex() {
 50  15
     return startIndex;
 51  
   }
 52  
 
 53  
   public void setStartIndex(int startIndex) {
 54  1
     this.startIndex = startIndex;
 55  1
   }
 56  
 
 57  
   public int getTotalResults() {
 58  19
     return totalResults;
 59  
   }
 60  
 
 61  
   public void setTotalResults(int totalResults) {
 62  1
     this.totalResults = totalResults;
 63  1
   }
 64  
 
 65  
   public boolean isFiltered() {
 66  6
     return filtered;
 67  
   }
 68  
 
 69  
   public void setFiltered(boolean filtered) {
 70  0
     this.filtered = filtered;
 71  0
   }
 72  
 
 73  
   public boolean isSorted() {
 74  6
     return sorted;
 75  
   }
 76  
 
 77  
   public void setSorted(boolean sorted) {
 78  0
     this.sorted = sorted;
 79  0
   }
 80  
 
 81  
   public boolean isUpdatedSince() {
 82  6
     return updatedSince;
 83  
   }
 84  
 
 85  
   public void setUpdatedSince(boolean updatedSince) {
 86  0
     this.updatedSince = updatedSince;
 87  0
   }
 88  
 }