You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/07/12 15:09:25 UTC

cvs commit: avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info ContextDescriptor.java

mcconnell    2003/07/12 06:09:25

  Modified:    meta/api/src/java/org/apache/avalon/meta/info
                        ContextDescriptor.java
  Log:
  Added hashCode() implementation.
  
  Revision  Changes    Path
  1.4       +14 -1     avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info/ContextDescriptor.java
  
  Index: ContextDescriptor.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info/ContextDescriptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextDescriptor.java	11 Jul 2003 04:49:33 -0000	1.3
  +++ ContextDescriptor.java	12 Jul 2003 13:09:25 -0000	1.4
  @@ -207,4 +207,17 @@
           list.addAll( Arrays.asList( secondary ) );
           return (EntryDescriptor[]) list.toArray( new EntryDescriptor[0] );
       }
  +
  +    public int hashCode()
  +    {
  +        int hash = super.hashCode();
  +        hash >>>= 7;
  +        hash ^= m_reference.hashCode();
  +        for( int i=0; i<m_entries.length; i++ )
  +        {
  +            hash >>>= 7;
  +            hash ^= m_entries[i].hashCode();
  +        }
  +        return hash;
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org