Module org.tquadrat.foundation.util
Class LazySortedMapImpl<K,V>
java.lang.Object
org.tquadrat.foundation.util.internal.LazyMapImpl<K,V>
org.tquadrat.foundation.util.internal.LazySortedMapImpl<K,V>
- Type Parameters:
K
- The type of keys maintained by this mapV
- The type of mapped values
- All Implemented Interfaces:
Map<K,
,V> SequencedMap<K,
,V> SortedMap<K,
,V> LazyMap<K,
,V> LazySortedMap<K,
V>
@ClassVersion(sourceVersion="$Id: LazySortedMapImpl.java 966 2022-01-04 22:28:49Z tquadrat $")
@API(status=INTERNAL,
since="0.0.5")
public final class LazySortedMapImpl<K,V>
extends LazyMapImpl<K,V>
implements LazySortedMap<K,V>
The implementation for
LazyMap
.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: LazySortedMapImpl.java 966 2022-01-04 22:28:49Z tquadrat $
- Since:
- 0.0.5
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.internal.LazySortedMapImpl"
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLazySortedMapImpl
(boolean doPopulate, Supplier<? extends SortedMap<K, V>> supplier) Creates a newLazySortedMapImpl<K,V>
instance.LazySortedMapImpl
(SortedMap<K, V> value) Creates a newLazyMapImpl
instance that is initialised with the given value. -
Method Summary
Modifier and TypeMethodDescriptionfinal Comparator
<? super K>
A call to this method initialises the lazy map.final K
firstKey()
A call to this method initialises the lazy map.holder()
Gives access to the internalLazy
instance for derived classes.final K
lastKey()
A call to this method initialises the lazy map.
A call to this method initialises the lazy map.Methods inherited from class org.tquadrat.foundation.util.internal.LazyMapImpl
clear, containsKey, containsValue, entrySet, equals, get, hashCode, ifPresent, init, isEmpty, isPresent, keySet, put, putAll, remove, size, toString, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry, sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
LazySortedMapImpl
Creates a newLazySortedMapImpl<K,V>
instance.- Parameters:
doPopulate
-true
if the provided supplier will put values to the map on initialisation,false
if it will create an empty map.supplier
- The supplier that initialises the internal map for this instance on the first it is needed.
-
LazySortedMapImpl
Creates a newLazyMapImpl
instance that is initialised with the given value.- Parameters:
value
- The initialisation value.
-
-
Method Details
-
comparator
A call to this method initialises the lazy map.- Specified by:
comparator
in interfaceSortedMap<K,
V>
-
firstKey
-
headMap
A call to this method initialises the lazy map. -
holder
Gives access to the internalLazy
instance for derived classes.- Overrides:
holder
in classLazyMapImpl<K,
V> - Returns:
- A reference to
LazyMapImpl.m_Holder
.
-
lastKey
-
subMap
A call to this method initialises the lazy map. -
tailMap
A call to this method initialises the lazy map.
-