peterreilly    2005/03/15 05:19:05

  Modified:    src/main/org/apache/tools/ant Tag: ANT_16_BRANCH
                        Location.java
  Log:
  sync
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.15.2.6  +27 -1     ant/src/main/org/apache/tools/ant/Location.java
  
  Index: Location.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Location.java,v
  retrieving revision 1.15.2.5
  retrieving revision 1.15.2.6
  diff -u -r1.15.2.5 -r1.15.2.6
  --- Location.java     17 Jul 2004 16:34:40 -0000      1.15.2.5
  +++ Location.java     15 Mar 2005 13:19:05 -0000      1.15.2.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2002-2004 The Apache Software Foundation
  + * Copyright  2000,2002-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -135,4 +135,30 @@
           return buf.toString();
       }
   
  +    /**
  +     * Equality operation.
  +     * @param other the object to compare to.
  +     * @return true if the other object contains the same information
  +     *              as this object.
  +     */
  +    public boolean equals(Object other) {
  +        if (this == other) {
  +            return true;
  +        }
  +        if (other == null) {
  +            return false;
  +        }
  +        if (!(other.getClass() == getClass())) {
  +            return false;
  +        }
  +        return toString().equals(other.toString());
  +    }
  +
  +    /**
  +     * Hash operation.
  +     * @return a hash code value for this location.
  +     */
  +    public int hashCode() {
  +        return toString().hashCode();
  +    }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to