mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
user data maps: notNull, minor equals() optimization
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user