avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info ContextDescriptor.java
Date Sat, 12 Jul 2003 13:09:25 GMT
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


Mime
View raw message