Java SortedMap Interface methods, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.
Methods in Java SortedMap Interface
S.No | Method & Description |
---|---|
1 | Comparator<? super K> comparator()
Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.
|
2 | Set<Map.Entry<K,V>> entrySet()
Returns a Set view of the mappings contained in this map.
|
3 | K firstKey()
Returns the first (lowest) key currently in this map.
|
4 | SortedMap<K,V> headMap(K toKey) Returns a view of the portion of this map whose keys are strictly less than toKey.
|
5 | Set<K> keySet()
Returns a Set view of the keys contained in this map.
|
6 | K lastKey()
Returns the last (highest) key currently in this map.
|
7 | SortedMap<K,V> subMap(K fromKey, K toKey)
Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
|
8 | SortedMap<K,V> tailMap(K fromKey)
Returns a view of the portion of this map whose keys are greater than or equal to fromKey.
|
9 | Collection<V> values()
Returns a Collection view of the values contained in this map.
|
Ask your questions in eHowToNow Forum
Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
- Java – IntSupplier Interface
- Java – HashMap Class
- Java – ConcurrentMap Interface
- Java – CountedCompleter Class
- Java – Exchanger Class
- Java – CompletionService Interface
- Java – AbstractOwnableSynchronizer Class
- Java ArrayList add(int index, E element) method with example
- Java – ServiceLoader Class
- Java – IntUnaryOperator Interface
- Java – ForkJoinTask Class
- Java – Objects Class in Util Package
- Java – AtomicReference Class
- Java – SplittableRandom Class
- Java – ConcurrentHashMap Class
Leave a Reply
You must be logged in to post a comment.