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 newLazyMapImplinstance 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 KfirstKey()
A call to this method initialises the lazy map.holder()Gives access to the internalLazyinstance for derived classes.final KlastKey()
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, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry, sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
LazySortedMapImpl
Creates a newLazySortedMapImpl<K,V>instance.- Parameters:
doPopulate-trueif the provided supplier will put values to the map on initialisation,falseif 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 newLazyMapImplinstance 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:
comparatorin interfaceSortedMap<K,V>
-
firstKey
-
headMap
A call to this method initialises the lazy map. -
holder
Gives access to the internalLazyinstance for derived classes.- Overrides:
holderin 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.
-
