io.github.shanqiang.table.ConcurrentIndex Maven / Gradle / Ivy
package io.github.shanqiang.table;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class ConcurrentIndex {
private final Map, V> index = new ConcurrentHashMap<>();
public void put(List key, V v) {
index.put(key, v);
}
public void remove(List key) {
index.remove(key);
}
public V get(List key) {
return index.get(key);
}
public V get(Comparable... key) {
return index.get(Arrays.asList(key));
}
public boolean containsKey(Comparable... key) {
return index.containsKey(key);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy