Coverage Report - net.sf.webphotos.entity.IsPhoto
 
Classes in this File Line Coverage Branch Coverage Complexity
IsPhoto
N/A
N/A
1
IsPhoto$1
0%
0/2
N/A
1
IsPhoto$2
0%
0/2
N/A
1
 
 1  
 /**
 2  
  * Copyright 2008 WebPhotos
 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  
 package net.sf.webphotos.entity;
 17  
 
 18  
 import java.util.Comparator;
 19  
 
 20  
 /**
 21  
  *
 22  
  * @author Guilherme
 23  
  */
 24  
 public interface IsPhoto extends Comparable<IsPhoto> {
 25  
     
 26  
     public String getKey();
 27  
 
 28  
     public IsCredits getCreditos();
 29  
     
 30  
     public String getLegenda();
 31  
     
 32  0
     public static final Comparator<IsPhoto> BY_KEY_ASCENDING = new Comparator<IsPhoto>() {
 33  
 
 34  
         @Override
 35  
         public int compare(IsPhoto photoOne, IsPhoto photoTwo) {
 36  0
             return photoOne.getKey().compareTo(photoTwo.getKey());
 37  
         }
 38  
         
 39  
     };
 40  
     
 41  0
     public static final Comparator<IsPhoto> BY_KEY_DESCENDING = new Comparator<IsPhoto>() {
 42  
 
 43  
         @Override
 44  
         public int compare(IsPhoto photoOne, IsPhoto photoTwo) {
 45  0
             return photoTwo.getKey().compareTo(photoOne.getKey());
 46  
         }
 47  
         
 48  
     };
 49  
     
 50  
 }