Package org.ojalgo.type.collection
Class CloseableMap<K,V extends AutoCloseable>
java.lang.Object
org.ojalgo.type.collection.CloseableMap<K,V>
- All Implemented Interfaces:
AutoCloseable
,Map<K,
V>
public class CloseableMap<K,V extends AutoCloseable>
extends Object
implements Map<K,V>, AutoCloseable
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
close()
computeIfAbsent
(K key, Function<? super K, ? extends V> mappingFunction) computeIfPresent
(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
void
forEach
(BiConsumer<? super K, ? super V> action) getOrDefault
(Object key, V defaultValue) int
hashCode()
boolean
isEmpty()
keySet()
static <K,
V extends AutoCloseable>
CloseableMap<K, V> static <K,
V extends AutoCloseable>
CloseableMap<K, V> newInstance
(int capacity) void
putIfAbsent
(K key, V value) boolean
boolean
void
replaceAll
(BiFunction<? super K, ? super V, ? extends V> function) int
size()
values()
static <K,
V extends AutoCloseable>
CloseableMap<K, V>
-
Field Details
-
myDelegate
-
-
Constructor Details
-
CloseableMap
-
-
Method Details
-
newInstance
-
newInstance
-
wrap
-
clear
public void clear()- Specified by:
clear
in interfaceMap<K,
V extends AutoCloseable>
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
compute
- Specified by:
compute
in interfaceMap<K,
V extends AutoCloseable>
-
computeIfAbsent
- Specified by:
computeIfAbsent
in interfaceMap<K,
V extends AutoCloseable>
-
computeIfPresent
- Specified by:
computeIfPresent
in interfaceMap<K,
V extends AutoCloseable>
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V extends AutoCloseable>
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V extends AutoCloseable>
-
entrySet
- Specified by:
entrySet
in interfaceMap<K,
V extends AutoCloseable>
-
equals
-
forEach
- Specified by:
forEach
in interfaceMap<K,
V extends AutoCloseable>
-
get
- Specified by:
get
in interfaceMap<K,
V extends AutoCloseable>
-
getOrDefault
- Specified by:
getOrDefault
in interfaceMap<K,
V extends AutoCloseable>
-
hashCode
public int hashCode() -
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceMap<K,
V extends AutoCloseable>
-
keySet
- Specified by:
keySet
in interfaceMap<K,
V extends AutoCloseable>
-
merge
- Specified by:
merge
in interfaceMap<K,
V extends AutoCloseable>
-
put
- Specified by:
put
in interfaceMap<K,
V extends AutoCloseable>
-
putAll
- Specified by:
putAll
in interfaceMap<K,
V extends AutoCloseable>
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceMap<K,
V extends AutoCloseable>
-
remove
- Specified by:
remove
in interfaceMap<K,
V extends AutoCloseable>
-
remove
- Specified by:
remove
in interfaceMap<K,
V extends AutoCloseable>
-
replace
- Specified by:
replace
in interfaceMap<K,
V extends AutoCloseable>
-
replace
- Specified by:
replace
in interfaceMap<K,
V extends AutoCloseable>
-
replaceAll
- Specified by:
replaceAll
in interfaceMap<K,
V extends AutoCloseable>
-
size
public int size()- Specified by:
size
in interfaceMap<K,
V extends AutoCloseable>
-
values
- Specified by:
values
in interfaceMap<K,
V extends AutoCloseable>
-