Пример #1
0
 public ImmutableSortedSet<T> newWithout(T element) {
   if (this.contains(element)) {
     TreeSortedSet<T> result = TreeSortedSet.newSet(this);
     result.remove(element);
     return result.toImmutable();
   }
   return this;
 }
Пример #2
0
 public ImmutableSortedSet<T> newWithoutAll(Iterable<? extends T> elements) {
   TreeSortedSet<T> result = TreeSortedSet.newSet(this);
   this.removeAllFrom(elements, result);
   return result.toImmutable();
 }
Пример #3
0
 public ImmutableSortedSet<T> newWithAll(Iterable<? extends T> elements) {
   TreeSortedSet<T> result = TreeSortedSet.newSet(this);
   result.addAllIterable(elements);
   return result.toImmutable();
 }
Пример #4
0
 public ImmutableSortedSet<T> filterNot(Predicate<? super T> predicate) {
   TreeSortedSet<T> result = TreeSortedSet.newSet(this.comparator());
   this.forEach(new FilterNotProcedure<T>(predicate, result));
   return result.toImmutable();
 }