@RequestMapping("/returnMap") public Map<String, Employee> returnMap() { return Maps.map("1", new Employee(1, "Rick"), "2", new Employee(2, "Diana")); }
public static <T> Map<String, T> toMap( final String propertyPath, final Collection<T> collection ) { return toMap( Typ.string, propertyPath, collection ); }
public static <K, T> NavigableMap<K, T> toSortedMap( Class<K> keyType, final String propertyPath, final Collection<T> collection ) { TreeMap<K, T> map = new TreeMap<>(); doPopulateMapWithCollectionAndPropPath( keyType, propertyPath, collection, map ); return map; }
final Map<String, List<SrvRecord>> dnsData = Maps.map( "db.skydns.local.", Lists.list( srv("db", "skydns.local", "server1.db.skydns.local"), final Map<String, EndpointDefinition> map = Maps.toMap(String.class, "host", endpointDefinitionList); final Map<String, EndpointDefinition> map2 = Maps.toMap(String.class, "host", endpointDefinitionList2);
@Override protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return Maps.copy(this); } } }
prettyPrintMap(Maps.toMap(value), indent); } else { prettyPrintMap(Maps.toPrettyMap(value), indent);
public FakeMapEntrySet(int size, String[] keys, Object[] values) { array = new Entry[size]; for (int index = 0; index < size; index++) { array[index] = Maps.entry(keys[index], values[index]); } }
public CharBuf prettyPrintBean(Object object) { final Map<String, Object> map = Maps.toPrettyMap(object); return prettyPrintMap(map, 0); }
public static <K, V> SortedMap<K, V> sliceOf( NavigableMap<K, V> map, K startIndex, K endIndex ) { return slc(map, startIndex, endIndex); }
public static <K, V> V atIndex( Map<K, V> map, K k ) { return idx(map, k ); }
public static int lengthOf( Map<?, ?> map ) { return len ( map ); }
public static <K, V> SortedMap<K, V> endSliceOf( NavigableMap<K, V> map, K fromKey ) { return slcEnd(map, fromKey); }
@Override protected Object clone() throws CloneNotSupportedException { if (map == null) { return null; } else { if (map instanceof LinkedHashMap) { return ((LinkedHashMap) map).clone(); } else { return Maps.copy(this); } } }
prettyPrintMap(Maps.toMap(value), indent); } else { prettyPrintMap(Maps.toPrettyMap(value), indent);
public FakeMapEntrySet(int size, String[] keys, Object[] values) { array = new Entry[size]; for (int index = 0; index < size; index++) { array[index] = Maps.entry(keys[index], values[index]); } }
public CharBuf prettyPrintBean(Object object) { final Map<String, Object> map = Maps.toPrettyMap(object); return prettyPrintMap(map, 0); }
public static <K, V> SortedMap<K, V> sliceOf( NavigableMap<K, V> map, K startIndex, K endIndex ) { return slc(map, startIndex, endIndex); }
public static <K, V> V atIndex( Map<K, V> map, K k ) { return idx(map, k ); }
public static int lengthOf( Map<?, ?> map ) { return len ( map ); }
public static <K, V> SortedMap<K, V> endSliceOf( NavigableMap<K, V> map, K fromKey ) { return slcEnd(map, fromKey); }