Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 58   Methods: 5
NCLOC: 43   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AbstractNode.java 75% 91.7% 100% 90.5%
coverage coverage
 1    /**
 2    *
 3    */
 4    package org.jboss.cache;
 5   
 6    import java.util.Map;
 7   
 8    /**
 9    * Base class for {@link UnversionedNode}.
 10    *
 11    * @author manik
 12    */
 13    public abstract class AbstractNode<K, V> implements Node<K, V>
 14    {
 15    protected boolean deleted;
 16    protected Map<Object, Node<K, V>> children;
 17    protected Fqn fqn;
 18   
 19  14909514 public boolean isDeleted()
 20    {
 21  14909472 return deleted;
 22    }
 23   
 24  14815 public void markAsDeleted(boolean marker)
 25    {
 26  14815 markAsDeleted(marker, false);
 27    }
 28   
 29  14941 public void markAsDeleted(boolean marker, boolean recursive)
 30    {
 31  14941 deleted = marker;
 32  14941 if (recursive && children != null)
 33    {
 34  23 synchronized (this)
 35    {
 36  23 for (Node child : children.values())
 37    {
 38  19 ((AbstractNode) child).markAsDeleted(marker, true);
 39    }
 40    }
 41    }
 42    }
 43   
 44  154 public boolean equals(Object another)
 45    {
 46  154 if (another instanceof AbstractNode)
 47    {
 48  154 AbstractNode anotherNode = (AbstractNode) another;
 49  154 return fqn == null && anotherNode.fqn == null || !(fqn == null || anotherNode.fqn == null) && fqn.equals(anotherNode.fqn);
 50    }
 51  0 return false;
 52    }
 53   
 54  583983 public int hashCode()
 55    {
 56  583983 return fqn.hashCode();
 57    }
 58    }