Code example for SortedMap

Methods: keySet

0
    public SortedMap<K, V> headMap(K key) {     
        return new SubMap(false, null, true, key);
    } 
 
    public Set<K> keySet() {
        return tailMap(firstKey()).keySet();
    } 
 
    public K lastKey() { 
        return entries.get(entries.size() - 1).getKey();
    } 
 
    public SortedMap<K, V> subMap(K startKey, K endKey) {
        return new SubMap(true, startKey, true, endKey);
    } 
 
    public SortedMap<K, V> tailMap(K key) {
        return new SubMap(true, key, false, null);
    } 
 
    public Collection<V> values() {