@Override public SortedSet<E> subSet(E fromElement, E toElement) { Comparator<E> comparator = naturalComparator(); return ((comparator.compare(this.element, toElement) < 0) && (comparator.compare(this.element, fromElement) >= 0)) ? this : Collections.<E>emptySortedSet(); }
@Override public SortedSet<E> tailSet(E fromElement) { return (naturalComparator().compare(this.element, fromElement) >= 0) ? this : Collections.<E>emptySortedSet(); }
@Override public SortedSet<E> headSet(E toElement) { return (naturalComparator().compare(this.element, toElement) < 0) ? this : Collections.<E>emptySortedSet(); }
@Test public void emptySortedSet() { this.verify(Collections.<Integer>emptySortedSet(), new TreeSet<Integer>(), 0, 1); }