@Test public void controllerConfigLikeContext() { Map<String, String> propsA = UtilMisc.toMap(LinkedHashMap::new, "aa", "1", "ab", "1"); Map<String, String> propsB = UtilMisc.toMap(LinkedHashMap::new, "ba", "3", "bb", "8", "bc", "1", "bd", "14"); PNode pn = new PNode(propsA, new PNode(propsB, new PNode(), new PNode()), new PNode(new PNode()), new PNode()); MapContext<String, String> mc = pn.allProps(); assertThat("insertion order of LinkedHashMap is preserved by the 'values' method", mc.values(), contains("1", "1", "3", "8", "1", "14")); }
@Override public Collection<V> values() { return entryStream() .map(Map.Entry::getValue) .collect(collectingAndThen(toList(), Collections::unmodifiableCollection)); }
MapContext implements Map<K, V>, LocalizedMap<V> { @Override public Collection<V> values() { return entryStream() .map(Map.Entry::getValue) .collect(collectingAndThen(toList(), Collections::unmodifiableCollection)); } }
MapContext implements Map<K, V>, LocalizedMap<V> { @Override public Collection<V> values() { return entryStream() .map(Map.Entry::getValue) .collect(collectingAndThen(toList(), Collections::unmodifiableCollection)); }  }
MapContext implements Map<K, V>, LocalizedMap<V> { @Override public Collection<V> values() { return entryStream() .map(Map.Entry::getValue) .collect(collectingAndThen(toList(), Collections::unmodifiableCollection)); }  Deque<Map<K, V>> getContexts(); void push(); void push(Map<K, V> existingMap); void addToBottom(Map<K, V> existingMap); Map<K, V> pop(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V get(String name, Locale locale); @Override V put(K key, V value); @Override V remove(Object key); @Override void putAll(Map<? extends K, ? extends V> arg0); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Map.Entry<K, V>> entrySet(); @Override String toString(); }
MapContext implements Map<K, V>, LocalizedMap<V> { @Override public Collection<V> values() { return entryStream() .map(Map.Entry::getValue) .collect(collectingAndThen(toList(), Collections::unmodifiableCollection)); }  Deque<Map<K, V>> getContexts(); void push(); void push(Map<K, V> existingMap); void addToBottom(Map<K, V> existingMap); Map<K, V> pop(); @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override V get(Object key); @Override V get(String name, Locale locale); @Override V put(K key, V value); @Override V remove(Object key); @Override void putAll(Map<? extends K, ? extends V> arg0); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Map.Entry<K, V>> entrySet(); @Override String toString();  }