/** * Returns an unmodifiable sorted set backed by the given sorted set. * <p> * This method uses the implementation in the decorators subpackage. * * @param set the sorted set to make unmodifiable, must not be null * @return an unmodifiable set backed by the given set * @throws IllegalArgumentException if the set is null */ public static SortedSet unmodifiableSortedSet(SortedSet set) { return UnmodifiableSortedSet.decorate(set); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new UnmodifiableSortedSet(sub); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new UnmodifiableSortedSet(sub); }
/** * Returns an unmodifiable sorted set backed by the given sorted set. * <p> * This method uses the implementation in the decorators subpackage. * * @param set the sorted set to make unmodifiable, must not be null * @return an unmodifiable set backed by the given set * @throws IllegalArgumentException if the set is null */ public static SortedSet unmodifiableSortedSet(SortedSet set) { return UnmodifiableSortedSet.decorate(set); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new UnmodifiableSortedSet(sub); }
public Set makeEmptySet() { return UnmodifiableSortedSet.decorate(new TreeSet()); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new UnmodifiableSortedSet(sub); }
public Set makeFullSet() { TreeSet set = new TreeSet(); set.addAll(Arrays.asList(getFullElements())); return UnmodifiableSortedSet.decorate(set); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }
public Iterator iterator() { return UnmodifiableIterator.decorate(getCollection().iterator()); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new UnmodifiableSortedSet(sub); }
/** * Returns an unmodifiable sorted set backed by the given sorted set. * <p> * This method uses the implementation in the decorators subpackage. * * @param set the sorted set to make unmodifiable, must not be null * @return an unmodifiable set backed by the given set * @throws IllegalArgumentException if the set is null */ public static SortedSet unmodifiableSortedSet(SortedSet set) { return UnmodifiableSortedSet.decorate(set); }
/** * Factory method to create an unmodifiable set. * * @param set the set to decorate, must not be null * @throws IllegalArgumentException if set is null */ public static SortedSet decorate(SortedSet set) { if (set instanceof Unmodifiable) { return set; } return new UnmodifiableSortedSet(set); }