Code example for SortedMap

Methods: subMap

0
        return map.comparator();
    } 
 
    @Override 
    public SortedSet<K> subSet(K fromElement, K toElement) {
        return new SortedMapSetView<>(map.subMap(fromElement, toElement));
    } 
 
    @Override 
    public SortedSet<K> headSet(K toElement) {
        return new SortedMapSetView<>(map.headMap(toElement));
    } 
 
    @Override 
    public SortedSet<K> tailSet(K fromElement) {
        return new SortedMapSetView<>(map.tailMap(fromElement));
    } 
 
    @Override 
    public K first() { 
        return map.firstKey();