org.etlunit.feature.database.util.DimensionalHashMap Maven / Gradle / Ivy
package org.etlunit.feature.database.util;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class DimensionalHashMap implements DimensionalMap {
private final Map> store = new HashMap>();
public void put(T t, K k, L l) {
Map t2 = store.get(t);
if (t2 == null)
{
t2 = new HashMap();
store.put(t, t2);
}
t2.put(k, l);
}
public L get(T t, K k) {
Map t2 = store.get(t);
if (t2 == null)
{
return null;
}
return t2.get(k);
}
public boolean containsKey(T t, K k) {
Map t2 = store.get(t);
if (t2 == null)
{
return false;
}
return t2.containsKey(k);
}
public boolean containsKey(T t) {
return store.containsKey(t);
}
public Set keySet() {
return store.keySet();
}
public int size() {
return store.size();
}
public int size(T t) {
Map klMap = store.get(t);
if (klMap == null)
{
return 0;
}
return klMap.size();
}
public Map get(T t) {
return store.get(t);
}
public L remove(T t, K k) {
Map t2 = store.get(t);
if (t2 == null)
{
return null;
}
return t2.remove(k);
}
public Map remove(T t) {
return store.remove(t);
}
public void clear() {
store.clear();
}
}