diff options
| author | Andrew Johnson | 2019-11-10 22:48:36 +0000 |
|---|---|---|
| committer | Andrew Johnson | 2019-11-10 22:48:36 +0000 |
| commit | 4f9209c19cc5f8ed3d09b4854fd5146b72d53857 (patch) | |
| tree | ebe4638073039011de0ad4a7b98c0d98a0e01608 | |
| parent | 52b0ccfceacc7f5171da606ac928fc54bda8f86d (diff) | |
| download | org.eclipse.mat-4f9209c19cc5f8ed3d09b4854fd5146b72d53857.tar.gz org.eclipse.mat-4f9209c19cc5f8ed3d09b4854fd5146b72d53857.tar.xz org.eclipse.mat-4f9209c19cc5f8ed3d09b4854fd5146b72d53857.zip | |
552879: OQL enhancements for sub-selects, maps, context providers etc.
Context provider fixes and getOQL() tests
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=552879
Change-Id: I7fa2db2c489b8d5b621db9dcf65697385004b4fe
| -rw-r--r-- | plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/collectionextract/IMapExtractor.java | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/collectionextract/IMapExtractor.java b/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/collectionextract/IMapExtractor.java index eeb91b4e..230cb9af 100644 --- a/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/collectionextract/IMapExtractor.java +++ b/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/collectionextract/IMapExtractor.java @@ -155,5 +155,51 @@ public interface IMapExtractor extends ICollectionExtractor { return getKey().getDisplayName()+ "=" +getValue().getDisplayName(); //$NON-NLS-1$ } + + @Override + public int hashCode() + { + final int prime = 31; + int result = 1; + result = prime * result + ((key == null) ? 0 : key.hashCode()); + result = prime * result + ((self == null) ? 0 : self.hashCode()); + result = prime * result + ((value == null) ? 0 : value.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + EntryObject other = (EntryObject) obj; + if (key == null) + { + if (other.key != null) + return false; + } + else if (!key.equals(other.key)) + return false; + if (self == null) + { + if (other.self != null) + return false; + } + else if (!self.equals(other.self)) + return false; + if (value == null) + { + if (other.value != null) + return false; + } + else if (!value.equals(other.value)) + return false; + return true; + } + } } |
