/** * Returns a fixed-sized sorted map backed by the given sorted 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 SortedMap is null */ public static SortedMap fixedSizeSortedMap(SortedMap map) { return FixedSizeSortedMap.decorate(map); }
public SortedMap tailMap(Object fromKey) { SortedMap map = getSortedMap().tailMap(fromKey); return new FixedSizeSortedMap(map); }
public int maxSize() { return size(); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }
public SortedMap headMap(Object toKey) { SortedMap map = getSortedMap().headMap(toKey); return new FixedSizeSortedMap(map); }
/** * Returns a fixed-sized sorted map backed by the given sorted 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 SortedMap is null */ public static SortedMap fixedSizeSortedMap(SortedMap map) { return FixedSizeSortedMap.decorate(map); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }
public int maxSize() { return size(); }
public SortedMap subMap(Object fromKey, Object toKey) { SortedMap map = getSortedMap().subMap(fromKey, toKey); return new FixedSizeSortedMap(map); }
public Map makeEmptyMap() { return FixedSizeSortedMap.decorate(new TreeMap()); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }
public int maxSize() { return size(); }
public SortedMap tailMap(Object fromKey) { SortedMap map = getSortedMap().tailMap(fromKey); return new FixedSizeSortedMap(map); }
public Map makeFullMap() { SortedMap map = new TreeMap(); addSampleMappings(map); return FixedSizeSortedMap.decorate(map); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }
public int maxSize() { return size(); }
public SortedMap subMap(Object fromKey, Object toKey) { SortedMap map = getSortedMap().subMap(fromKey, toKey); return new FixedSizeSortedMap(map); }
/** * Returns a fixed-sized sorted map backed by the given sorted 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 SortedMap is null */ public static SortedMap fixedSizeSortedMap(SortedMap map) { return FixedSizeSortedMap.decorate(map); }
/** * Factory method to create a fixed size sorted map. * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ public static SortedMap decorate(SortedMap map) { return new FixedSizeSortedMap(map); }