/** * Returns a fixed-sized map backed by the given map. * Elements may not be added or removed from the returned map, but * existing elements can be changed (for instance, via the * {@link Map#put(Object,Object)} method). * * @param map the map whose size to fix, must not be null * @return a fixed-size map backed by that map * @throws IllegalArgumentException if the Map is null */ public static Map fixedSizeMap(Map map) { return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
/** * Returns a fixed-sized map backed by the given map. * Elements may not be added or removed from the returned map, but * existing elements can be changed (for instance, via the * {@link Map#put(Object,Object)} method). * * @param map the map whose size to fix, must not be null * @return a fixed-size map backed by that map * @throws IllegalArgumentException if the Map is null */ public static Map fixedSizeMap(Map map) { return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
public Map makeEmptyMap() { return FixedSizeMap.decorate(new HashMap()); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
public Map makeFullMap() { Map map = new HashMap(); addSampleMappings(map); return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
/** * Returns a fixed-sized map backed by the given map. * Elements may not be added or removed from the returned map, but * existing elements can be changed (for instance, via the * {@link Map#put(Object,Object)} method). * * @param map the map whose size to fix, must not be null * @return a fixed-size map backed by that map * @throws IllegalArgumentException if the Map is null */ public static Map fixedSizeMap(Map map) { return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
/** * Returns a fixed-sized map backed by the given map. * Elements may not be added or removed from the returned map, but * existing elements can be changed (for instance, via the * {@link Map#put(Object,Object)} method). * * @param map the map whose size to fix, must not be null * @return a fixed-size map backed by that map * @throws IllegalArgumentException if the Map is null */ public static Map fixedSizeMap(Map map) { return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }
public int maxSize() { return size(); }
/** * Returns a fixed-sized map backed by the given map. * Elements may not be added or removed from the returned map, but * existing elements can be changed (for instance, via the * {@link Map#put(Object,Object)} method). * * @param map the map whose size to fix, must not be null * @return a fixed-size map backed by that map * @throws IllegalArgumentException if the Map is null */ public static Map fixedSizeMap(Map map) { return FixedSizeMap.decorate(map); }
/** * Factory method to create a fixed size map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static Map decorate(Map map) { return new FixedSizeMap(map); }