[New] Added .hashCode() and .equals() to MapOf*
This commit is contained in:
parent
ffc62e7351
commit
bbbe75b2b0
|
@ -160,4 +160,21 @@ public class MapOfLists<T, U> {
|
||||||
action.accept(k, u);
|
action.accept(k, u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
MapOfLists<?, ?> that = (MapOfLists<?, ?>) o;
|
||||||
|
|
||||||
|
return Objects.equals(this.mapOfLists, that.mapOfLists);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return this.mapOfLists != null ? this.mapOfLists.hashCode() : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,4 +205,21 @@ public class MapOfMaps<T, U, V> {
|
||||||
action.accept(k, u);
|
action.accept(k, u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
MapOfMaps<?, ?, ?> mapOfMaps1 = (MapOfMaps<?, ?, ?>) o;
|
||||||
|
|
||||||
|
return Objects.equals(this.mapOfMaps, mapOfMaps1.mapOfMaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return this.mapOfMaps != null ? this.mapOfMaps.hashCode() : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,4 +160,21 @@ public class MapOfSets<T, U> {
|
||||||
action.accept(k, u);
|
action.accept(k, u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
MapOfSets<?, ?> mapOfSets1 = (MapOfSets<?, ?>) o;
|
||||||
|
return Objects.equals(this.mapOfSets, mapOfSets1.mapOfSets);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return this.mapOfSets != null ? this.mapOfSets.hashCode() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue