[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Wed Sep 13 13:10:42 EDT 2006


  User: msurtani
  Date: 06/09/13 13:10:42

  Modified:    src/org/jboss/cache  TreeCacheProxyImpl.java
  Log:
  - Added equals and hashcode for TCPI
  - Started unit tests for Node api
  
  Revision  Changes    Path
  1.33      +23 -0     JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheProxyImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCacheProxyImpl.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -b -r1.32 -r1.33
  --- TreeCacheProxyImpl.java	13 Sep 2006 15:53:05 -0000	1.32
  +++ TreeCacheProxyImpl.java	13 Sep 2006 17:10:42 -0000	1.33
  @@ -562,4 +562,27 @@
      {
         currentNode.setChildrenLoaded(b);
      }
  +
  +   public boolean equals(Object o)
  +   {
  +      if (this == o) return true;
  +      if (o == null || getClass() != o.getClass()) return false;
  +
  +      final TreeCacheProxyImpl that = (TreeCacheProxyImpl) o;
  +
  +      if (currentNode != null ? !currentNode.equals(that.currentNode) : that.currentNode != null) return false;
  +      if (log != null ? !log.equals(that.log) : that.log != null) return false;
  +      if (treeCache != null ? !treeCache.equals(that.treeCache) : that.treeCache != null) return false;
  +
  +      return true;
  +   }
  +
  +   public int hashCode()
  +   {
  +      int result;
  +      result = (treeCache != null ? treeCache.hashCode() : 0);
  +      result = 29 * result + (currentNode != null ? currentNode.hashCode() : 0);
  +      return result;
  +   }
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list