Package com.cedarsoftware.io.util
Class EmptyNavigableMap<K,V>
java.lang.Object
com.cedarsoftware.io.util.EmptyNavigableMap<K,V>
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values
- All Implemented Interfaces:
Map<K,,V> NavigableMap<K,,V> SortedMap<K,V>
This class provides an immutable, empty implementation of the NavigableMap interface.
It is designed to be a singleton as there is no internal state that varies between instances.
- Author:
- John DeRegnaucourt
Copyright (c) Cedar Software LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
License
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionceilingEntry(K key) ceilingKey(K key) voidclear()Comparator<? super K>booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanfirstKey()floorEntry(K key) inthashCode()higherEntry(K key) booleanisEmpty()keySet()lastKey()lowerEntry(K key) voidintsize()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
EmptyNavigableMap
public EmptyNavigableMap()
-
-
Method Details
-
comparator
- Specified by:
comparatorin interfaceSortedMap<K,V>
-
firstKey
-
lastKey
-
lowerEntry
- Specified by:
lowerEntryin interfaceNavigableMap<K,V>
-
lowerKey
- Specified by:
lowerKeyin interfaceNavigableMap<K,V>
-
floorEntry
- Specified by:
floorEntryin interfaceNavigableMap<K,V>
-
floorKey
- Specified by:
floorKeyin interfaceNavigableMap<K,V>
-
ceilingEntry
- Specified by:
ceilingEntryin interfaceNavigableMap<K,V>
-
ceilingKey
- Specified by:
ceilingKeyin interfaceNavigableMap<K,V>
-
higherEntry
- Specified by:
higherEntryin interfaceNavigableMap<K,V>
-
higherKey
- Specified by:
higherKeyin interfaceNavigableMap<K,V>
-
firstEntry
- Specified by:
firstEntryin interfaceNavigableMap<K,V>
-
lastEntry
- Specified by:
lastEntryin interfaceNavigableMap<K,V>
-
pollFirstEntry
- Specified by:
pollFirstEntryin interfaceNavigableMap<K,V>
-
pollLastEntry
- Specified by:
pollLastEntryin interfaceNavigableMap<K,V>
-
descendingMap
- Specified by:
descendingMapin interfaceNavigableMap<K,V>
-
descendingKeySet
- Specified by:
descendingKeySetin interfaceNavigableMap<K,V>
-
subMap
- Specified by:
subMapin interfaceNavigableMap<K,V>
-
headMap
- Specified by:
headMapin interfaceNavigableMap<K,V>
-
tailMap
- Specified by:
tailMapin interfaceNavigableMap<K,V>
-
subMap
-
headMap
-
tailMap
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode()
-