org.unlaxer.util.collection.Layer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of japanese-address-parser Show documentation
Show all versions of japanese-address-parser Show documentation
a simplejapanese address parser
The newest version!
package org.unlaxer.util.collection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Layer {//implements List{
final List layers;
final Map layersByKey;
public Layer() {
super();
layers = new ArrayList<>();
layersByKey = new HashMap<>();
}
public Layer addLayer(K key ,V value){
layersByKey.put(key, value);
layers.add(value);
return this;
}
public V get(K key) {
return layersByKey.get(key);
}
public List values(){
return layers;
}
public int size() {
return layers.size();
}
public V getByIndex(int index) {
return layers.get(index);
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy