Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 68   Methods: 10
NCLOC: 48   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SamplePojo.java 50% 73.3% 70% 70.4%
coverage coverage
 1    package org.jboss.cache.loader;
 2   
 3    import java.io.Serializable;
 4    import java.util.ArrayList;
 5    import java.util.List;
 6   
 7    /**
 8    * Sample object for testing.
 9    *
 10    * @author Bela Ban
 11    * @version $Id: SamplePojo.java,v 1.3 2007/02/07 22:06:49 genman Exp $
 12    */
 13    public class SamplePojo implements Serializable {
 14    int age;
 15    String name;
 16    List hobbies=new ArrayList();
 17   
 18  313 public SamplePojo(int age, String name) {
 19  313 this.age=age;
 20  313 this.name=name;
 21    }
 22   
 23  65 public int getAge() {
 24  65 return age;
 25    }
 26   
 27  0 public void setAge(int age) {
 28  0 this.age=age;
 29    }
 30   
 31  65 public String getName() {
 32  65 return name;
 33    }
 34   
 35  0 public void setName(String name) {
 36  0 this.name=name;
 37    }
 38   
 39  107 public List getHobbies() {
 40  107 return hobbies;
 41    }
 42   
 43  0 public void setHobbies(List hobbies) {
 44  0 this.hobbies=hobbies;
 45    }
 46   
 47  4 public String toString() {
 48  4 return "name=" + name + ", age=" + age + ", hobbies=" + hobbies;
 49    }
 50   
 51  51 public boolean equals(Object o)
 52    {
 53  51 if (!(o instanceof SamplePojo))
 54    {
 55  0 return false;
 56    }
 57   
 58  51 SamplePojo other = (SamplePojo) o;
 59  51 boolean equals = (name.equals(other.getName())) && (age == other.getAge()) && (hobbies.equals(other.getHobbies()));
 60  51 return equals;
 61    }
 62   
 63  48 public int hashCode()
 64    {
 65  48 return name.hashCode() ^ age ^ hobbies.hashCode();
 66    }
 67   
 68    }