Code example for LinkedHashMap

public class Sharded<R, S extends ShardInfo<R>> { 
    public static final int DEFAULT_WEIGHT = 1;
    private TreeMap<Long, S> nodes;
    private final Hashing algo;
    private final Map<ShardInfo<R>, R> resources = new LinkedHashMap<ShardInfo<R>, R>();
     * The default pattern used for extracting a key tag. The pattern must have 
     * a group (between parenthesis), which delimits the tag to be hashed. A 
     * null pattern avoids applying the regular expression for each lookup, 
     * improving performance a little bit is key tags aren't being used. 
    private Pattern tagPattern = null;
    // the tag is anything between {} 
    public static final Pattern DEFAULT_KEY_TAG_PATTERN = Pattern
    public Sharded(List<S> shards) {
        this(shards, Hashing.MURMUR_HASH); // MD5 is really not good as we works
Contextual code suggestions in your IDE  Get Codota for Java