Package eu.bandm.tscore.base
Class TpMap<V extends Comparable<? extends V>>
Collection which assigns syntactic time point objects to
numeric values, and vice versa.
A function from top-level timepoints
TpTop to this value type
is given as a constructor parameter.
Normally, all Tps requested by get(java.lang.Object) must be
related to one or two arguments of that function, by living in the
same timescape.
Beside, sporadic Tps can be added by makeTp(V).-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionMaps every numeric value ever calculated to all corresponding syntactic Tps.Yields a function which divides the given range into the given number of sections, and delivers the start of the n-th section when applied to n.Function which divides double intervals.Function which divides Rational intervals.Maps every time point ever inquire to its numeric value.Maps every top-level timepoint to a numeric value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(Object tp) Check whether a given syntactic time point is related to a numerical value, by this map.entrySet()Return the numerial value of the argument.Return the numerial value of the argument.Directly adding a relation between a time point and a numeric value is not supported.UnsupportedOperationExceptionvalues()Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
supply
Maps every time point ever inquire to its numeric value. -
backward
Maps every numeric value ever calculated to all corresponding syntactic Tps. -
tptop2value
Maps every top-level timepoint to a numeric value. This function is given as constructor argument, and is the basis for all calculations of numeric values. -
divide
final Function3<V extends Comparable<? extends V>,V extends Comparable<? extends V>, divideInteger, Function<Integer, V extends Comparable<? extends V>>> Yields a function which divides the given range into the given number of sections, and delivers the start of the n-th section when applied to n. This function is given as constructor argument, and is the basis for all calculations of numeric values. -
projectRational
Function which divides Rational intervals. Forseen as argument toTpMap(java.util.function.Function<eu.bandm.tscore.model.TpTop,V>,eu.bandm.tools.util.function.Function3<V,V,java.lang.Integer,java.util.function.Function<java.lang.Integer,V>>). -
projectDouble
Function which divides double intervals. Forseen as argument toTpMap(java.util.function.Function<eu.bandm.tscore.model.TpTop,V>,eu.bandm.tools.util.function.Function3<V,V,java.lang.Integer,java.util.function.Function<java.lang.Integer,V>>).
-
-
Constructor Details
-
TpMap
Only constructor. Its arguments are the basis for all calculations.- Parameters:
tptop2value- Maps every top-level timepoint to a numeric value.divide- A function which divides the given range into the given number of sections, and delivers the start of the n-th section when applied to n.
-
-
Method Details
-
get
Return the numerial value of the argument. Look-up cache or calculate it. The argument must live in the same timescape as the arguments oftptop2value.- Specified by:
getin interfaceMap<Tp,V extends Comparable<? extends V>> - Overrides:
getin classAbstractMap<Tp,V extends Comparable<? extends V>>
-
get
Return the numerial value of the argument. Look-up cache or calculate it. The argument must live in the same timescape as the arguments oftptop2value. -
put
Directly adding a relation between a time point and a numeric value is not supported. Instead, all values are calculated and depend only on the constructor arguments of this class.- Specified by:
putin interfaceMap<Tp,V extends Comparable<? extends V>> - Overrides:
putin classAbstractMap<Tp,V extends Comparable<? extends V>> - Throws:
UnsupportedOperationException
-
containsKey
Check whether a given syntactic time point is related to a numerical value, by this map.- Specified by:
containsKeyin interfaceMap<Tp,V extends Comparable<? extends V>> - Overrides:
containsKeyin classAbstractMap<Tp,V extends Comparable<? extends V>>
-
remove
UnsupportedOperationException- Specified by:
removein interfaceMap<Tp,V extends Comparable<? extends V>> - Overrides:
removein classAbstractMap<Tp,V extends Comparable<? extends V>> - Throws:
UnsupportedOperationException
-
entrySet
- Specified by:
entrySetin interfaceMap<Tp,V extends Comparable<? extends V>> - Specified by:
entrySetin classAbstractMap<Tp,V extends Comparable<? extends V>>
-
sortedTps
-
values
- Specified by:
valuesin interfaceMap<Tp,V extends Comparable<? extends V>> - Overrides:
valuesin classAbstractMap<Tp,V extends Comparable<? extends V>>
-
preimage
-
makeTp
-
makeTp
-
getTp
-