Refactor tidy after #1863. Add NaturalKeyEntrySimple for single property natural key lookup.

This commit is contained in:
rob bygrave
2019-11-16 21:48:37 +13:00
parent dfefbecf44
commit aa96d10491
7 changed files with 188 additions and 86 deletions
@@ -9,7 +9,7 @@ public class NaturalKeySet {
private final Map<Object, NaturalKeyEntry> map = new LinkedHashMap<>();
public NaturalKeySet() {
NaturalKeySet() {
}
public int size() {
@@ -24,8 +24,7 @@ public class NaturalKeySet {
return map.keySet();
}
public Object getInValue(Object naturalKey) {
NaturalKeyEntry entry = map.get(naturalKey);
return entry.getInValue();
Object getInValue(Object naturalKey) {
return map.get(naturalKey).getInValue();
}
}