/** * Factory method to create a predicated (validating) sorted set. * <p> * If there are any elements already in the set being decorated, they * are validated. * * @param set the set to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @throws IllegalArgumentException if set or predicate is null * @throws IllegalArgumentException if the set contains invalid elements */ public static SortedSet decorate(SortedSet set, Predicate predicate) { return new PredicatedSortedSet(set, predicate); }
/** * Factory method to create a predicated (validating) sorted set. * <p> * If there are any elements already in the set being decorated, they * are validated. * * @param set the set to decorate, must not be null * @param predicate the predicate to use for validation, must not be null * @throws IllegalArgumentException if set or predicate is null * @throws IllegalArgumentException if the set contains invalid elements */ public static SortedSet decorate(SortedSet set, Predicate predicate) { return new PredicatedSortedSet(set, predicate); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new PredicatedSortedSet(sub, predicate); }
/** * Factory method to create a typed sorted set. * <p> * If there are any elements already in the set being decorated, they * are validated. * * @param set the set to decorate, must not be null * @param type the type to allow into the collection, must not be null * @throws IllegalArgumentException if set or type is null * @throws IllegalArgumentException if the set contains invalid elements */ public static SortedSet decorate(SortedSet set, Class type) { return new PredicatedSortedSet(set, InstanceofPredicate.getInstance(type)); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new PredicatedSortedSet(sub, predicate); }
/** * Factory method to create a typed sorted set. * <p> * If there are any elements already in the set being decorated, they * are validated. * * @param set the set to decorate, must not be null * @param type the type to allow into the collection, must not be null * @throws IllegalArgumentException if set or type is null * @throws IllegalArgumentException if the set contains invalid elements */ public static SortedSet decorate(SortedSet set, Class type) { return new PredicatedSortedSet(set, InstanceofPredicate.getInstance(type)); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet tailSet(Object fromElement) { SortedSet sub = getSortedSet().tailSet(fromElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet headSet(Object toElement) { SortedSet sub = getSortedSet().headSet(toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }
public SortedSet subSet(Object fromElement, Object toElement) { SortedSet sub = getSortedSet().subSet(fromElement, toElement); return new PredicatedSortedSet(sub, predicate); }