diff options
Diffstat (limited to 'src/com/android/loganalysis/item/GenericItem.java')
-rw-r--r-- | src/com/android/loganalysis/item/GenericItem.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/com/android/loganalysis/item/GenericItem.java b/src/com/android/loganalysis/item/GenericItem.java index 0ebf870..b93b658 100644 --- a/src/com/android/loganalysis/item/GenericItem.java +++ b/src/com/android/loganalysis/item/GenericItem.java @@ -86,9 +86,7 @@ public class GenericItem implements IItem { return mergedAttributes; } - /** - * {@inhertiDoc} - */ + /** {@inheritDoc} */ @Override public boolean isConsistent(IItem other) { if (this == other) { @@ -128,6 +126,17 @@ public class GenericItem implements IItem { return true; } + /** {@inheritDoc} */ + @Override + public int hashCode() { + int result = 13; + for (String attribute : mAllowedAttributes) { + Object val = getAttribute(attribute); + result += 37 * (val == null ? 0 : val.hashCode()); + } + return result; + } + /** * {@inheritDoc} * <p> |