/** * Creates a new {@link CopyOnWriteMap} with an underlying * {@link LinkedHashMap}. Iterators for this map will be return elements in * insertion order. * <p> * This map has {@link View.Type.STABLE stable} views. */ public static <K, V> CopyOnWriteMap<K, V> newLinkedMap() { final Builder<K, V> builder = builder(); return builder.newLinkedMap(); }
/** * Creates a new {@link CopyOnWriteMap} with an underlying * {@link LinkedHashMap} using the supplied map as the initial values. * Iterators for this map will be return elements in insertion order. * <p> * This map has {@link View.Type.STABLE stable} views. */ public static <K, V> CopyOnWriteMap<K, V> newLinkedMap(final Map<? extends K, ? extends V> map) { final Builder<K, V> builder = builder(); return builder.addAll(map).newLinkedMap(); }