@Override public SortedSet<T> tailSet(T fromElement) { ReactiveSeq<T> x = host.stream() .dropWhile(e -> !Objects.equals(e, fromElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }
default SortedSetView<T> sortedSetView(){ return new SortedSetView.Impl<>(this); } }
@Override public SortedSet<T> tailSet(T fromElement) { ReactiveSeq<T> x = host.stream() .dropWhile(e -> !Objects.equals(e, fromElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }
@Override public boolean containsAll(Collection<?> c) { for(Object n : c){ if(!contains(n)) return false; } return true; }
@Override public SortedSet<T> subSet(T fromElement, T toElement) { ReactiveSeq<T> x = host.stream() .dropWhile(e -> !Objects.equals(e, fromElement)) .takeWhile(e -> !Objects.equals(e, toElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }
@Override public SortedSet<T> headSet(T toElement) { ReactiveSeq<T> x = host.stream() .takeWhile(e -> !Objects.equals(e, toElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }
default SortedSetView<T> sortedSetView(){ return new SortedSetView.Impl<>(this); } }
@Override public boolean containsAll(Collection<?> c) { for(Object n : c){ if(!contains(n)) return false; } return true; }
@Override public SortedSet<T> subSet(T fromElement, T toElement) { ReactiveSeq<T> x = host.stream() .dropWhile(e -> !Objects.equals(e, fromElement)) .takeWhile(e -> !Objects.equals(e, toElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }
@Override public SortedSet<T> headSet(T toElement) { ReactiveSeq<T> x = host.stream() .takeWhile(e -> !Objects.equals(e, toElement)); return x.collect(Collectors.toCollection(()->new TreeSet<>(comparator()))); }