@Override public SortedMap<K, V> subMap(K fromKey, K toKey) { Comparator<K> comparator = naturalComparator(); return ((comparator.compare(this.entry.getKey(), toKey) < 0) && (comparator.compare(this.entry.getKey(), fromKey) >= 0)) ? this : Collections.<K, V>emptySortedMap(); }
@Override public SortedMap<K, V> tailMap(K fromKey) { return (naturalComparator().compare(this.entry.getKey(), fromKey) >= 0) ? this : Collections.<K, V>emptySortedMap(); }
@Override public SortedMap<K, V> headMap(K toKey) { return (naturalComparator().compare(this.entry.getKey(), toKey) < 0) ? this : Collections.<K, V>emptySortedMap(); }
@Test public void emptySortedMap() { this.verify( Collections.<Integer, String>emptySortedMap(), new TreeMap<Integer, String>(), 0, 1, ""); }