Changeset 12147


Ignore:
Timestamp:
2006-07-11T15:26:42+12:00 (18 years ago)
Author:
kjdon
Message:

added an equals method which compares the strings rather than the objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/metadata/MetadataSet.java

    r9201 r12147  
    9797    // Elements in metadata sets are sorted according to the other they are specified in the .mds file
    9898    return metadata_set_elements.indexOf(metadata_element_a) - metadata_set_elements.indexOf(metadata_element_b);
     99    }
     100
     101    /** we consider MetadataSets to be equal if their names and namespaces match */
     102    public boolean equals(Object obj) {
     103    if (obj instanceof MetadataSet) {
     104        return toString().equals(obj.toString());
     105    }
     106    return false;
    99107    }
    100108
Note: See TracChangeset for help on using the changeset viewer.