Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 81   Methods: 7
NCLOC: 48   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LFUConfiguration.java 0% 57.1% 71.4% 56.5%
coverage coverage
 1    /*
 2    * JBoss, the OpenSource J2EE webOS
 3    *
 4    * Distributable under LGPL license.
 5    * See terms of license at gnu.org.
 6    */
 7    package org.jboss.cache.eviction;
 8   
 9    import org.jboss.cache.config.Dynamic;
 10   
 11    /**
 12    * Configuration implementation for {@link LFUPolicy}.
 13    * <p/>
 14    * If configured via XML, expects the following:
 15    * <p/>
 16    * <pre>
 17    * <region name="abc">
 18    * <attribute name="minNodes">10</attribute>
 19    * <attribute name="maxNodes">20</attribute>
 20    * </region>
 21    * </pre>
 22    *
 23    * @author Daniel Huang (dhuang@jboss.org)
 24    * @version $Revision: 1.9 $
 25    */
 26    public class LFUConfiguration extends EvictionPolicyConfigBase
 27    {
 28    /** The serialVersionUID */
 29    private static final long serialVersionUID = 1865801530398969179L;
 30   
 31    @Dynamic
 32    private int minNodes;
 33   
 34  26 public LFUConfiguration()
 35    {
 36  26 super();
 37    }
 38   
 39  44 @Override
 40    protected void setEvictionPolicyClassName()
 41    {
 42  44 setEvictionPolicyClass(LFUPolicy.class.getName());
 43    }
 44   
 45  12532 public int getMinNodes()
 46    {
 47  12532 return minNodes;
 48    }
 49   
 50  23 public void setMinNodes(int minNodes)
 51    {
 52  23 testImmutability("minNodes");
 53  23 this.minNodes = minNodes;
 54    }
 55   
 56  0 public String toString()
 57    {
 58  0 StringBuffer ret = new StringBuffer();
 59  0 ret.append("LFUConfiguration: maxNodes = ").append(getMaxNodes()).append(" minNodes = ").append(getMinNodes());
 60  0 return ret.toString();
 61    }
 62   
 63  0 @Override
 64    public boolean equals(Object obj)
 65    {
 66  0 if (obj instanceof LFUConfiguration && super.equals(obj))
 67    {
 68  0 return (this.minNodes == ((LFUConfiguration) obj).minNodes);
 69    }
 70  0 return false;
 71    }
 72   
 73  43 @Override
 74    public int hashCode()
 75    {
 76  43 int result = super.hashCode();
 77  43 result = 31 * result + minNodes;
 78  43 return result;
 79    }
 80   
 81    }