@Test public void testSafeMap() { Map<String, Dog> dogMap = Maps.safeMap( "dog", new Dog( "dog" ) ); assertEquals( "dog", dogMap.get( "dog" ).name ); dogMap = Maps.safeMap( new String[]{ "dog0", "dog1", "dog2" }, new Dog[]{ new Dog( "dog0" ), new Dog( "dog1" ), new Dog( "dog2" ) } ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); dogMap = Maps.safeMap( Arrays.asList( new String[]{ "dog0", "dog1", "dog2" } ), Arrays.asList( new Dog( "dog0" ), new Dog( "dog1" ), new Dog( "dog2" ) ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); dogMap = Maps.safeMap( ( Iterable ) Arrays.asList( "dog0", "dog1", "dog2" ), ( Iterable ) Arrays.asList( new Dog( "dog0" ), new Dog( "dog1" ), new Dog( "dog2" ) ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); dogMap = Maps.safeMap( "dog", new Dog( "dog" ), "dog1", new Dog( "dog1" ) ); assertEquals( "dog", dogMap.get( "dog" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); dogMap = Maps.safeMap( "dog", new Dog( "dog" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ) ); assertEquals( "dog", dogMap.get( "dog" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); dogMap = Maps.safeMap( Maps.entry("dog0", new Dog("dog0")), Maps.entry("dog1", new Dog("dog1")), Maps.entry("dog2", new Dog("dog2")) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); dogMap = Maps.safeMap( "dog", new Dog( "dog" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ) ); assertEquals( "dog", dogMap.get( "dog" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ), "dog5", new Dog( "dog5" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); assertEquals( "dog5", dogMap.get( "dog5" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ), "dog5", new Dog( "dog5" ), "dog6", new Dog( "dog6" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); assertEquals( "dog5", dogMap.get( "dog5" ).name ); assertEquals( "dog6", dogMap.get( "dog6" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ), "dog5", new Dog( "dog5" ), "dog6", new Dog( "dog6" ), "dog7", new Dog( "dog7" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); assertEquals( "dog5", dogMap.get( "dog5" ).name ); assertEquals( "dog6", dogMap.get( "dog6" ).name ); assertEquals( "dog7", dogMap.get( "dog7" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ), "dog5", new Dog( "dog5" ), "dog6", new Dog( "dog6" ), "dog7", new Dog( "dog7" ), "dog8", new Dog( "dog8" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); assertEquals( "dog5", dogMap.get( "dog5" ).name ); assertEquals( "dog6", dogMap.get( "dog6" ).name ); assertEquals( "dog7", dogMap.get( "dog7" ).name ); assertEquals( "dog8", dogMap.get( "dog8" ).name ); dogMap = Maps.safeMap( "dog0", new Dog( "dog0" ), "dog1", new Dog( "dog1" ), "dog2", new Dog( "dog2" ), "dog3", new Dog( "dog3" ), "dog4", new Dog( "dog4" ), "dog5", new Dog( "dog5" ), "dog6", new Dog( "dog6" ), "dog7", new Dog( "dog7" ), "dog8", new Dog( "dog8" ), "dog9", new Dog( "dog9" ) ); assertEquals( "dog0", dogMap.get( "dog0" ).name ); assertEquals( "dog1", dogMap.get( "dog1" ).name ); assertEquals( "dog2", dogMap.get( "dog2" ).name ); assertEquals( "dog3", dogMap.get( "dog3" ).name ); assertEquals( "dog4", dogMap.get( "dog4" ).name ); assertEquals( "dog5", dogMap.get( "dog5" ).name ); assertEquals( "dog6", dogMap.get( "dog6" ).name ); assertEquals( "dog7", dogMap.get( "dog7" ).name ); assertEquals( "dog8", dogMap.get( "dog8" ).name ); assertEquals( "dog9", dogMap.get( "dog9" ).name ); assertEquals( 10, Maps.len(dogMap) ); }
public static <K, V> Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ) { return new ConcurrentHashMap<>( 10 ); }
Maps { public static <K, V> Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ) { return new ConcurrentHashMap<>( 10 ); } }
Maps { public static <K, V> Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ) { return new ConcurrentHashMap<>( 10 ); }  }
Maps { public static <K, V> Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ) { return new ConcurrentHashMap<>( 10 ); }  static List<V> lazyCreate( List<V> lazy ); static Map<K,V> lazyCreate( Map<K,V> lazy ); static Map<K,V> lazyCreate( HashMap<K,V> lazy ); static Map<K,V> lazyCreate( LinkedHashMap<K,V> lazy ); static Map<K,V> lazyCreateLinked( Map<K,V> lazy ); static Map<K,V> lazyCreate( ConcurrentHashMap<K,V> lazy ); static Map<K,V> lazyCreateSafe( Map<K,V> lazy ); @Universal static int lengthOf( Map<?, ?> map ); @Universal static V atIndex( Map<K, V> map, K k ); @Universal static SortedMap<K, V> sliceOf( NavigableMap<K, V> map, K startIndex, K endIndex ); @Universal static SortedMap<K, V> endSliceOf( NavigableMap<K, V> map, K fromKey ); @Universal static int len( Map<?, ?> map ); @Universal static boolean in( K key, Map<K, V> map ); @Universal static void add( Map<K, V> map, Entry<K, V> entry ); @Universal static V idx( Map<K, V> map, K k ); @Universal static void idx( Map<K, V> map, K k, V v ); static String idxStr( Map<K, V> map, K k ); static Integer idxInt( Map<K, V> map, K k ); static Long idxLong( Map<K, V> map, K k ); static Map idxMap( Map<K, V> map, K k ); static List idxList( Map<K, V> map, K k ); static long toLong( Map<K, V> map, K key ); static int toInt( Map<K, V> map, K key ); @Universal static SortedMap<K, V> copy( SortedMap<K, V> map ); @Universal static Map<K, V> copy( Map<K, V> map ); @Universal static V first( NavigableMap<K, V> map ); @Universal static V last( NavigableMap<K, V> map ); @Universal static V after( NavigableMap<K, V> map, final K index ); @Universal static V before( NavigableMap<K, V> map, final K index ); @Universal static SortedMap<K, V> slc( NavigableMap<K, V> map, K startIndex, K endIndex ); @Universal static SortedMap<K, V> slcEnd( NavigableMap<K, V> map, K fromKey ); @Universal static SortedMap<K, V> slc( NavigableMap<K, V> map, K toKey ); static boolean valueIn( V value, Map<K, V> map ); static Entry<K, V> entry( final K k, final V v ); static Entry<K, V> entry( Entry<K, V> entry ); static Map<?, ?> mapFromArray( Object... args ); static Map<K, V> map( Class<K> keyClass, Class<V> valueClass ); static Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ); static Map<K, V> map( K k0, V v0 ); static Map<K, V> map( K k0, V v0, K k1, V v1 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17,
                                        K k18, V v18); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17,
                                        K k18, V v18, K k19, V v19); static Map<K, V> map( List<K> keys, List<V> values ); static Map<K, V> map( LinkedHashSet<K> keys, LinkedHashSet<V> values ); static Map<K, V> map( Iterable<K> keys, Iterable<V> values ); static Map<K, V> map( K[] keys, V[] values ); @SafeVarargs static Map<K, V> map( Entry<K, V>... entries ); @SafeVarargs static Map<K, V> mapByEntries( Entry<K, V>... entries ); static NavigableMap<K, V> sortedMap( K k0, V v0 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                       K k9, V v9 ); static NavigableMap<K, V> sortedMap( Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> sortedMap( Iterable<K> keys, Iterable<V> values ); static NavigableMap<K, V> sortedMap( K[] keys, V[] values ); static NavigableMap<K, V> sortedMap( List<Entry<K, V>> entries ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                       K k9, V v9 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K[] keys, V[] values ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, List<Entry<K, V>> entries ); static Map<K, V> safeMap( Map<K, V> map ); static Map<K, V> safeMap( K k0, V v0 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                            K k9, V v9 ); static Map<K, V> safeMap( Collection<K> keys, Collection<V> values ); static Map<K, V> safeMap( Iterable<K> keys, Iterable<V> values ); static Map<K, V> safeMap( K[] keys, V[] values ); @SafeVarargs static Map<K, V> safeMap( Entry<K, V>... entries ); static NavigableMap<K, V> safeSortedMap( K k0, V v0 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                           K k9, V v9 ); static NavigableMap<K, V> safeSortedMap( Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> safeSortedMap( Iterable<K> keys, Iterable<V> values ); static NavigableMap<K, V> safeSortedMap( K[] keys, V[] values ); @SafeVarargs static NavigableMap<K, V> safeSortedMap( Entry<K, V>... entries ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                           K k9, V v9 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K[] keys, V[] values ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, List<Entry<K, V>> entries ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static T idx( Class<T> clz, Map map, Object key ); static T fromMap( Map<String, Object> map, Class<T> clazz ); static Object fromMap( final Map<String, Object> map ); static Map<String, Object> toMap( final Object object ); static Map<String, List<T>> toMultiValueMap( final String propertyPath, final Collection<T> collection ); static Map<String, T> toMap( final String propertyPath, final Collection<T> collection ); static NavigableMap<String, T> toSortedMap( final String propertyPath, final Collection<T> collection ); static NavigableMap<String, T> toSafeSortedMap( final String propertyPath, final Collection<T> collection ); static Map<String, T> toSafeMap( final String propertyPath, final Collection<T> collection ); static Map<K, T> toMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static NavigableMap<K, T> toSortedMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static NavigableMap<K, T> toSafeSortedMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static Map<K, T> toSafeMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static void copyKeys(Collection<K> keys, Map<K, V> sourceMap, Map<K,V> destinationMap); static Map<K, V> copyKeys(Collection<K> keys, Map<K, V> sourceMap); static String asPrettyJsonString(Map<String, Object> map); static Map <String, Object> toPrettyMap(Object object); }
Maps { public static <K, V> Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ) { return new ConcurrentHashMap<>( 10 ); }  static List<V> lazyCreate( List<V> lazy ); static Map<K,V> lazyCreate( Map<K,V> lazy ); static Map<K,V> lazyCreate( HashMap<K,V> lazy ); static Map<K,V> lazyCreate( LinkedHashMap<K,V> lazy ); static Map<K,V> lazyCreateLinked( Map<K,V> lazy ); static Map<K,V> lazyCreate( ConcurrentHashMap<K,V> lazy ); static Map<K,V> lazyCreateSafe( Map<K,V> lazy ); @Universal static int lengthOf( Map<?, ?> map ); @Universal static V atIndex( Map<K, V> map, K k ); @Universal static SortedMap<K, V> sliceOf( NavigableMap<K, V> map, K startIndex, K endIndex ); @Universal static SortedMap<K, V> endSliceOf( NavigableMap<K, V> map, K fromKey ); @Universal static int len( Map<?, ?> map ); @Universal static boolean in( K key, Map<K, V> map ); @Universal static void add( Map<K, V> map, Entry<K, V> entry ); @Universal static V idx( Map<K, V> map, K k ); @Universal static void idx( Map<K, V> map, K k, V v ); static String idxStr( Map<K, V> map, K k ); static Integer idxInt( Map<K, V> map, K k ); static Long idxLong( Map<K, V> map, K k ); static Map idxMap( Map<K, V> map, K k ); static List idxList( Map<K, V> map, K k ); static long toLong( Map<K, V> map, K key ); static int toInt( Map<K, V> map, K key ); @Universal static SortedMap<K, V> copy( SortedMap<K, V> map ); @Universal static Map<K, V> copy( Map<K, V> map ); @Universal static V first( NavigableMap<K, V> map ); @Universal static V last( NavigableMap<K, V> map ); @Universal static V after( NavigableMap<K, V> map, final K index ); @Universal static V before( NavigableMap<K, V> map, final K index ); @Universal static SortedMap<K, V> slc( NavigableMap<K, V> map, K startIndex, K endIndex ); @Universal static SortedMap<K, V> slcEnd( NavigableMap<K, V> map, K fromKey ); @Universal static SortedMap<K, V> slc( NavigableMap<K, V> map, K toKey ); static boolean valueIn( V value, Map<K, V> map ); static Entry<K, V> entry( final K k, final V v ); static Entry<K, V> entry( Entry<K, V> entry ); static Map<?, ?> mapFromArray( Object... args ); static Map<K, V> map( Class<K> keyClass, Class<V> valueClass ); static Map<K, V> safeMap( Class<K> keyClass, Class<V> valueClass ); static Map<K, V> map( K k0, V v0 ); static Map<K, V> map( K k0, V v0, K k1, V v1 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13 ); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17,
                                        K k18, V v18); static Map<K, V> map( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                        V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                        K k9, V v9, K k10, V v10, K k11, V v11, K k12, V v12, K k13, V v13,
                                        K k14, V v14, K k15, V v15, K k16, V v16, K k17, V v17,
                                        K k18, V v18, K k19, V v19); static Map<K, V> map( List<K> keys, List<V> values ); static Map<K, V> map( LinkedHashSet<K> keys, LinkedHashSet<V> values ); static Map<K, V> map( Iterable<K> keys, Iterable<V> values ); static Map<K, V> map( K[] keys, V[] values ); @SafeVarargs static Map<K, V> map( Entry<K, V>... entries ); @SafeVarargs static Map<K, V> mapByEntries( Entry<K, V>... entries ); static NavigableMap<K, V> sortedMap( K k0, V v0 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> sortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                       K k9, V v9 ); static NavigableMap<K, V> sortedMap( Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> sortedMap( Iterable<K> keys, Iterable<V> values ); static NavigableMap<K, V> sortedMap( K[] keys, V[] values ); static NavigableMap<K, V> sortedMap( List<Entry<K, V>> entries ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                       V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                       K k9, V v9 ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, K[] keys, V[] values ); static NavigableMap<K, V> sortedMap( Comparator<K> comparator, List<Entry<K, V>> entries ); static Map<K, V> safeMap( Map<K, V> map ); static Map<K, V> safeMap( K k0, V v0 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static Map<K, V> safeMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                            V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                            K k9, V v9 ); static Map<K, V> safeMap( Collection<K> keys, Collection<V> values ); static Map<K, V> safeMap( Iterable<K> keys, Iterable<V> values ); static Map<K, V> safeMap( K[] keys, V[] values ); @SafeVarargs static Map<K, V> safeMap( Entry<K, V>... entries ); static NavigableMap<K, V> safeSortedMap( K k0, V v0 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> safeSortedMap( K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                           K k9, V v9 ); static NavigableMap<K, V> safeSortedMap( Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> safeSortedMap( Iterable<K> keys, Iterable<V> values ); static NavigableMap<K, V> safeSortedMap( K[] keys, V[] values ); @SafeVarargs static NavigableMap<K, V> safeSortedMap( Entry<K, V>... entries ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K k0, V v0, K k1, V v1, K k2, V v2, K k3,
                                                           V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8,
                                                           K k9, V v9 ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, Collection<K> keys, Collection<V> values ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, K[] keys, V[] values ); static NavigableMap<K, V> safeSortedMap( Comparator<K> comparator, List<Entry<K, V>> entries ); @SuppressWarnings ( { "unchecked", "rawtypes" } ) static T idx( Class<T> clz, Map map, Object key ); static T fromMap( Map<String, Object> map, Class<T> clazz ); static Object fromMap( final Map<String, Object> map ); static Map<String, Object> toMap( final Object object ); static Map<String, List<T>> toMultiValueMap( final String propertyPath, final Collection<T> collection ); static Map<String, T> toMap( final String propertyPath, final Collection<T> collection ); static NavigableMap<String, T> toSortedMap( final String propertyPath, final Collection<T> collection ); static NavigableMap<String, T> toSafeSortedMap( final String propertyPath, final Collection<T> collection ); static Map<String, T> toSafeMap( final String propertyPath, final Collection<T> collection ); static Map<K, T> toMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static NavigableMap<K, T> toSortedMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static NavigableMap<K, T> toSafeSortedMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static Map<K, T> toSafeMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ); static void copyKeys(Collection<K> keys, Map<K, V> sourceMap, Map<K,V> destinationMap); static Map<K, V> copyKeys(Collection<K> keys, Map<K, V> sourceMap); static String asPrettyJsonString(Map<String, Object> map); static Map <String, Object> toPrettyMap(Object object);  }