user data maps: notNull, minor equals() optimization

This commit is contained in:
peter
2014-06-17 19:00:47 +02:00
parent 4bbb63ef96
commit 7b346dae4e
2 changed files with 3 additions and 3 deletions
@@ -22,7 +22,7 @@ public class OneElementFMap<V> implements KeyFMap {
private final Key myKey;
private final V myValue;
public OneElementFMap(Key key, @NotNull V value) {
public OneElementFMap(@NotNull Key key, @NotNull V value) {
myKey = key;
myValue = value;
}
@@ -71,7 +71,7 @@ public class OneElementFMap<V> implements KeyFMap {
OneElementFMap map = (OneElementFMap)o;
if (!myKey.equals(map.myKey)) return false;
if (myKey != map.myKey) return false;
if (!myValue.equals(map.myValue)) return false;
return true;
@@ -24,7 +24,7 @@ class PairElementsFMap implements KeyFMap {
private final Object value1;
private final Object value2;
PairElementsFMap(Key key1, @NotNull Object value1, Key key2, @NotNull Object value2) {
PairElementsFMap(@NotNull Key key1, @NotNull Object value1, @NotNull Key key2, @NotNull Object value2) {
this.key1 = key1;
this.value1 = value1;
this.key2 = key2;