/** * Factory method to create an unmodifiable map. * <p> * If the map passed in is already unmodifiable, it is returned. * * @param map the map to decorate, must not be null * @return an unmodifiable SortedBidiMap * @throws IllegalArgumentException if map is null */ public static SortedBidiMap decorate(SortedBidiMap map) { if (map is Unmodifiable) { return map; } return new UnmodifiableSortedBidiMap(map); }
/** * Factory method to create an unmodifiable map. * <p> * If the map passed in is already unmodifiable, it is returned. * * @param map the map to decorate, must not be null * @return an unmodifiable SortedBidiMap * @throws IllegalArgumentException if map is null */ public static SortedBidiMap decorate(SortedBidiMap map) { if (map is Unmodifiable) { return(map); } return(new UnmodifiableSortedBidiMap(map)); }
//----------------------------------------------------------------------- /** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if map is null */ private UnmodifiableSortedBidiMap(SortedBidiMap map) : base(map) { }
/** * Constructor that wraps (not copies). * * @param map the map to decorate, must not be null * @throws IllegalArgumentException if the collection is null */ public AbstractSortedBidiMapDecorator(SortedBidiMap map) : base(map) { }