Package eu.bandm.tscore.base
Class Util
java.lang.Object
eu.bandm.tscore.base.Util
Collection of static utility methods.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Employed for the central map from a "naturally" ordered arithmetic type (like Rational, BigInteger, etc.) to Tp objects representing time points, allowing their time-respecting traversal.static class
Step through all time points and process the tuple of events from all voices which are currently "sounding". -
Method Summary
Modifier and TypeMethodDescriptionstatic final <D> Function3<Comparator<? super D>,
D, D, @Opt String> Checks whether two time points are equal; to be plugged into parseTpTops().static final <D> Function3<@Opt Comparator<? super D>,
D, D, @Opt String> Checks whether two time points are strictly increasing; to be plugged into parseTpTops().static final <D> Function3<Comparator<? super D>,
D, D, @Opt String> Checks whether two time points are not decreasing; to be plugged into parseTpTops().Delivers the class for a given name, iff existing.static BigInteger
Calculates the greatest common divider of the denominators of the given Rationals.static <V> void
eliminateLineBreaks
(Part p, Map<TpTop, V> values) DOCMEstatic Vox
findVoice
(Container ts, @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String voiceName) Searches for the voice with the given name and generates messages if not found.static @Opt eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier>
firstLocation
(Vox v) Returns the location of the first event in a voice, in source text order.static <T> T
fromFile
(Class<T> cls, File inputfile, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) static <T> T
fromStream
(Class<T> cls, InputStream inputstream, String sourceIndication, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) ATTENTION only reads and converts part 0 !!static TpTop
getLeftTpTop
(Tp tp) Returns the highest TpTop lower or equal to the given Tp.getParamText
(Event ev, String trackname, String separator, eu.bandm.tools.location.LocationMap<Object, eu.bandm.tools.util.xml.XMLDocumentIdentifier> locs) Delivers the source text for a gvien parameter and a given event.static Rational
Central function for translating abstract tp values into numeric values by calculating an equi-distant sub-division recursively.static Rational
getRationalValue
(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache.static Rational
getRationalValue
(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Multimap<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache.static Rational
getRationalValue
(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache.static Rational
getRationalValue_lenient
(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache.static TpTop
getRightTpTop
(Tp tp) Returns the lowest TpTop higher or equal to the given Tp.static Rational
Returns the distance of the given Tp to the next left TpTop, which is in many cases its relative position in a measure, or sim.Filter on Events which visits only those which have an (explicit, source level) value for a given parameter name.static <R,
D> D highestLowerBound
(SortedMap<R, D> map, R key) Returns the highest/largest key contained in the map which is lower or equal to tke given value.Filter on Events which visits only those which appear as key in the given map.static @Opt eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier>
lastLocation
(Vox v) Returns the location of the last event in a voice, in source text order.static void
Stores the fact that two events are neighbours/adjacent into the Map.static void
Stores the start point of one event as the end point of its predecessor.static void
Stores the start point of one event as the end point of its predecessor, ignoring certain explicitly mentioned events.static boolean
noUnknownVoices
(TimeScape ts, @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String... voiceNames) Checks whether no voice object exists with a name not explicitly given.static void
parseParamTrack
(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Vox v, String trackname, String separator, Translet.Parser<?> parser, Modifiers react) Applies a certainTranslet.Parser
parser to the given parameter track.static <P> Translet.Parser<P>
parserForName
(@Opt String className, String parserName) Delivers the parser object for the members of a particular class.static TimeScape
parseTimeScape
(File in, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) CallsparseTimeScape(InputStream,String,Modifiers,MessageReceiver)
with the canonical file name.static TimeScape
parseTimeScape
(InputStream in, String sourceIndication, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Applies tscore-raw-layer parser and delivers an tscore umod data model.static TimeScape
parseTimeScape
(Reader in, String inputFileName, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Applies tscore-raw-layer parser and delivers an tscore umod data model.static <T> void
parseTpTops
(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Modifiers modifiers, Part part, Map<TpTop, T> values, SortedMap<T, TpTop> representatives, Translet.Parser<T> parser, @Opt Function3<Comparator<? super T>, T, T, @Opt String> check_oneLine, @Opt Function3<Comparator<? super T>, T, T, @Opt String> check_twoLines) Parse all TpTops into some internal numeric format "T" and store them.partsToScores
(TimeScape ts, String topName, @Opt String scoreNameTemplate, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, P parameters, Function4<String, Part, MessageReceiver, P, D> constructorCall) Translate every "PART" section in a time scape object into one single score object each.static <A,
B> Iterable<B> range_respectingDomainOrder
(Multimap<A, B> data) static <A,
B> Iterable<B> range_respectingDomainOrder
(SortedMap<A, B> data) static void
shiftDivision
(TDivision td, Tp old, Tp now) Change the division to end at "now" and no longer at "old".static eu.bandm.tools.location.LocationMap<Object,
eu.bandm.tools.util.xml.XMLDocumentIdentifier> singletonMap
(String data, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> sourceLoc) Constructs aLocationMap
which points from the given String into the given location.Deliver the only part of the timescape object, if any, otherwise null.static <T> void
ATTENTION: Different subdivisions are not unified automatically, e.g.static <T> boolean
veryFirstEventHasRequiredParameter
(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Event firstEv, Vox v, Map<Event, T> map, String pname) Checks whether the very first event of a particular voice has a necessary parameter.voiceEvents
(Vox v, Iterable<? extends Tp> tps) voiceFilter
(Vox v, Iterable<E> it) AnIterables.FilterIterable
over any Event Iterable which visits only those events of a givenVox
.static boolean
voicesExist
(TimeScape ts, @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String... voiceNames) Checks whether for each given voice name a voice object exists.static void
warnUnusedParams
(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Vox v, Set<String> analysed, boolean errorNotWarn) Emits a warning or an error if the source text of a voice contains parameters which are not analysed.
-
Method Details
-
thePart
Deliver the only part of the timescape object, if any, otherwise null. -
partsToScores
public static <D,P> Map<String,D> partsToScores(TimeScape ts, String topName, @Opt @Opt String scoreNameTemplate, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, @Opt P parameters, Function4<String, Part, MessageReceiver, P, D> constructorCall) Translate every "PART" section in a time scape object into one single score object each. If there is only one part, it gets the explicitly given "topname"; otherwise the scoreNameTemplate is expanded (byString.format(String,Object...)
) to create the name from this explicit name and the name of the part in the score. Assumes that the names for the parts in one score are used unambiguously.- Type Parameters:
D
- the type of the created score objectP
- the type of the additional optional creation parameters- Parameters:
ts
- the time scape object (=tscore input file parse result)topName
- the name to use if only only PART section is present in the sourcescoreNameTemplate
- the string format template to combine "topName" and the name, the part is given in the score, if more than one part is contained.msg
- passed to the constructorparameters
- passed to the constructorconstructorCall
- must be a constructor with the arguments (1) name of the score to construct, (2) tscore part object to convert (3) message receiver (4) further optional construction parameters of an arbitrary type "P".
-
parseTimeScape
public static TimeScape parseTimeScape(File in, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) CallsparseTimeScape(InputStream,String,Modifiers,MessageReceiver)
with the canonical file name. -
parseTimeScape
public static TimeScape parseTimeScape(InputStream in, String sourceIndication, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Applies tscore-raw-layer parser and delivers an tscore umod data model. Assume utf-8 encoding.- Parameters:
in
- the input to be parsed.sourceIndication
- to be used in error messagesmodifiers
- configuration data, partly relevant for raw parsing processmsg
- receiver of logging and error messages
-
parseTimeScape
public static TimeScape parseTimeScape(Reader in, String inputFileName, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) Applies tscore-raw-layer parser and delivers an tscore umod data model. Assume utf-8 encoding.- Parameters:
in
- the input to be parsed.inputFileName
- to be used in error messagesmodifiers
- configuration data, partly relevant for raw parsing processmsg
- receiver of logging and error messages
-
fromStream
@Opt public static <T> T fromStream(Class<T> cls, InputStream inputstream, String sourceIndication, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) ATTENTION only reads and converts part 0 !!- Parameters:
cls
- must have a constructor with one single part and MessageReceiver, and a methodeupdate()
-
fromFile
@Opt public static <T> T fromFile(Class<T> cls, File inputfile, Modifiers modifiers, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg) -
checkIncreasing
Checks whether two time points are strictly increasing; to be plugged into parseTpTops(). Returns null if okay, otherwise error message != null. -
checkNotDecreasing
Checks whether two time points are not decreasing; to be plugged into parseTpTops(). Returns null if okay, otherwise error message != null. -
checkEqual
Checks whether two time points are equal; to be plugged into parseTpTops(). Returns null if okay, otherwise error message != null. -
singletonMap
public static eu.bandm.tools.location.LocationMap<Object,eu.bandm.tools.util.xml.XMLDocumentIdentifier> singletonMap(String data, eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> sourceLoc) Constructs aLocationMap
which points from the given String into the given location. Auxiliary function, needed e.g. when some input to a parser/lexer is locally pre-processed. -
parseTpTops
public static <T> void parseTpTops(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Modifiers modifiers, Part part, Map<TpTop, T> values, SortedMap<T, TpTop> representatives, Translet.Parser<T> parser, @Opt @Opt Function3<Comparator<? super T>, T, T, @Opt String> check_oneLine, @Opt @Opt Function3<Comparator<? super T>, T, T, @Opt String> check_twoLines) Parse all TpTops into some internal numeric format "T" and store them. In this version each result from T may occur maximally once. This is the standard inside of one PART. (When unifying TpTops due to identical T-value, all subdivisions must be unified accordingly, which is NOT YET IMPLEMENTED)
ATTENTION raw parser does unify TpTop-text in several lines into one data object, but DOES NOT preserve the originalLocation
but the first. (Different to parameter values, which are stored into lists of tupels!) Therefore the diagnosis/location info looks slightly different (even wrong) in the rare case that tp-top source text is in more than one line, as inT 1h 1h 59'59.0 0' 2'
- Parameters:
values
- output parameter where the T-values will be stored.representatives
- backward map, stores one(1) TpTop for every computed T-value, namely the latest parsed.parser
- Parser, generates possibly complicated error messagescheck_oneLine
- check for two top values following in ONE time line. Typically a test for "strictly later". Iff ==null, no such check is performed.check_twoLines
- check for last TpTop in one line and the first in the next line. Typically a test for "later or equal". Iff ==null, no such check is performed. FIXME use "PreImageMap values"instead of "values+representatives" ?!?!
-
eliminateLineBreaks
DOCME -
shiftDivision
Change the division to end at "now" and no longer at "old". -
getRationalValue
public static Rational getRationalValue(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache. In this overlading it is aMap
, for use cases where different Tps can yield only differentRational
values. If this is violated, an error message is sent. As alternatives seegetRationalValue(Function,Map,Tp)
,getRationalValue(Function,Map,Tp,Map)
,getRationalValue_lenient(Function,Map,Tp,Map)
, andgetRationalValue(Function,Map,Tp,Multimap)
.- Parameters:
tptop2rat
- how to calculate a Rational value from the text of a top time point.cache
- from tscore time point objects to Rationalstp
- the tscore time point object to convert into a Rationalmsg
- receiver for error messagesrat2tp
- backward cache which maps each Rational to at most one time point object.
-
getRationalValue
public static Rational getRationalValue(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache. In this overlading it is aMap
, for use cases where different Tps can yield only differentRational
values. If this is violated, anIllegalArgumentException
is thrown. As alternatives seegetRationalValue(Function,Map,Tp,MessageReceiver,Map)
,getRationalValue(Function,Map,Tp)
,getRationalValue_lenient(Function,Map,Tp,Map)
, andgetRationalValue(Function,Map,Tp,Multimap)
.- Parameters:
tptop2rat
- how to calculate a Rational value from the text of a top time point.cache
- from tscore time point objects to Rationalstp
- the tscore time point object to convert into a Rationalrat2tp
- backward cache which maps each Rational to at most one time point object.
-
getRationalValue_lenient
public static Rational getRationalValue_lenient(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Map<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache. In this overlading it is aMap
. Multiple time point objects may represent the same Rational, but only the first is stored in the backward cache. As alternatives seegetRationalValue(Function,Map,Tp,MessageReceiver,Map)
,getRationalValue(Function,Map,Tp)
,getRationalValue(Function,Map,Tp,Map)
, andgetRationalValue(Function,Map,Tp,Multimap)
.- Parameters:
tptop2rat
- how to calculate a Rational value from the text of a top time point.cache
- from tscore time point objects to Rationalstp
- the tscore time point object to convert into a Rationalrat2tp
- backward cache which maps each Rational to at most one time point object.
-
getRationalValue
public static Rational getRationalValue(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp, Multimap<Rational, Tp> rat2tp) Translates abstract tp values into numeric values and maintains a second, backward cache. In this overlading it is aMultimap
, since different Tps can yield the sameRational
value. As alternatives seegetRationalValue(Function,Map,Tp,MessageReceiver,Map)
,getRationalValue(Function,Map,Tp)
,getRationalValue(Function,Map,Tp,Map)
, andgetRationalValue_lenient(Function,Map,Tp,Map)
.- Parameters:
tptop2rat
- how to calculate a Rational value from the text of a top time point.cache
- from tscore time point objects to Rationalstp
- the tscore time point object to convert into a Rationalrat2tp
- backward cache which maps each Rational to arbitrary many
-
getRationalValue
public static Rational getRationalValue(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp) Central function for translating abstract tp values into numeric values by calculating an equi-distant sub-division recursively. Requires an interpretation function of only the top-level TpTops. A cache is maintained and used.
If needed, an inverse map must be maintained by the caller, because it can be aMap
(all Tp correspond to differentRational
values) or aMultimap
(different Tps can yield the sameRational
value.) As alternatives seegetRationalValue(Function,Map,Tp,MessageReceiver,Map)
,getRationalValue(Function,Map,Tp,Map)
,getRationalValue_lenient(Function,Map,Tp,Map)
, andgetRationalValue(Function,Map,Tp,Multimap)
.- Parameters:
tptop2rat
- translation for tptop objectscache
-tp
- the to to translate- Returns:
- the Rational value of parameter tp
-
getLeftTpTop
Returns the highest TpTop lower or equal to the given Tp. -
getRightTpTop
Returns the lowest TpTop higher or equal to the given Tp. -
getTpTopRelativeRational
public static Rational getTpTopRelativeRational(Function<TpTop, Rational> tptop2rat, Map<Tp, Rational> cache, Tp tp) Returns the distance of the given Tp to the next left TpTop, which is in many cases its relative position in a measure, or sim. -
commonDivider
Calculates the greatest common divider of the denominators of the given Rationals. -
unifyEventTimesByScalarValue
public static <T> void unifyEventTimesByScalarValue(Map<T, Tp> representatives, Function<Tp, T> tp2t, Vox vox) ATTENTION: Different subdivisions are not unified automatically, e.g. when interpreted as Rational values. SeeT 7 8 VOX a b c d e f VOX w x y z
Division by 4 in VOX a and by 2 in VOX w are not unified by default: theTp
s of Event d and y are different (while having possibly the sameRational
value, or sim.) The following function must be applied to all vox-es to patch the "when" fields and all access maps, if only one Tp object may represent a certain "T" value.- Parameters:
representatives
- maps each occuring numeric time values to one Tp object. This map may serve as an input and / or as an output data.tp2t
- function which calculates the numeric time value for any Tp objectvox
- voice object to process and (possibly) modify
-
getParamText
@Opt public static @Opt String getParamText(Event ev, String trackname, String separator, eu.bandm.tools.location.LocationMap<Object, eu.bandm.tools.util.xml.XMLDocumentIdentifier> locs) Delivers the source text for a gvien parameter and a given event. If more than one lines are involved in the source, their contents are combined with the given separator String. For every fragment in ev.get_params()... it holds that length is >0 and content is non-blank. Therefore result!=null implies length>0 and (some) non-blank content.
((????? FIXME STIMMT NICHT »" "« ist möglich! )) -
parseParamTrack
public static void parseParamTrack(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Vox v, String trackname, String separator, Translet.Parser<?> parser, Modifiers react) Applies a certainTranslet.Parser
parser to the given parameter track. The parser must contain the store operations required to deliver the results.- Parameters:
msg
- The message receiver for error messages.v
- the voice to parsetrackname
- non-empty string.separator
- string for concatenating parameter values from several lines in the source fileparser
- given as an expression
-
classForName
Delivers the class for a given name, iff existing.- Parameters:
n
- the class name (completely qualified), may be null
-
parserForName
@Opt public static <P> Translet.Parser<P> parserForName(@Opt @Opt String className, String parserName) Delivers the parser object for the members of a particular class.- Parameters:
className
- the class name (completely qualified), may be nullparserName
- the name of the static method which delivers the parser. (in case of music: "membersParser")
-
range_respectingDomainOrder
Delivers anIterator
over the range of aMultimap
which visits the range values in the order of the corresponding domain values. Assumes that domain HAS an order, and that this is realized technically by using aSortedMap
as the "left" map when constructing the Multimap, eg. by usingUtil.Multimap_LTree
. This is currently NOT CHECKED. FIXME -
range_respectingDomainOrder
-
voiceFilter
AnIterables.FilterIterable
over any Event Iterable which visits only those events of a givenVox
. -
voiceEvents
-
haveParam
Filter on Events which visits only those which have an (explicit, source level) value for a given parameter name. -
keysOnly
Filter on Events which visits only those which appear as key in the given map. -
memoAdjacency
Stores the fact that two events are neighbours/adjacent into the Map. -
memoEndTime
Stores the start point of one event as the end point of its predecessor.- Parameters:
last
- to be stored as the end point of the very last event
-
memoEndTime_ignoring
public static void memoEndTime_ignoring(Iterable<Event> evs, Set<Event> ignore, Map<Event, Tp> map, Tp last) Stores the start point of one event as the end point of its predecessor, ignoring certain explicitly mentioned events.- Parameters:
last
- to be stored as the end point of the very last event FIXME version with "Predicate" for ignoring will be more versatile !
-
findVoice
public static Vox findVoice(Container ts, @Opt @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String voiceName) Searches for the voice with the given name and generates messages if not found.- Parameters:
ts
- either TimeScape or Part. ATTENTION, in TimeScape only timeless (meta-)data is contained. The "real" voices with events are only in Parts.generateErrors
- whether to generate error messages, not only warnings
-
voicesExist
public static boolean voicesExist(TimeScape ts, @Opt @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String... voiceNames) Checks whether for each given voice name a voice object exists.- Parameters:
generateErrors
- whether to generate error messages, not only warnings
-
noUnknownVoices
public static boolean noUnknownVoices(TimeScape ts, @Opt @Opt MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, boolean generateErrors, String... voiceNames) Checks whether no voice object exists with a name not explicitly given.- Parameters:
generateErrors
- whether to generate error messages, not only warnings
-
firstLocation
@Opt public static @Opt eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> firstLocation(Vox v) Returns the location of the first event in a voice, in source text order. -
lastLocation
@Opt public static @Opt eu.bandm.tools.location.Location<eu.bandm.tools.util.xml.XMLDocumentIdentifier> lastLocation(Vox v) Returns the location of the last event in a voice, in source text order. -
warnUnusedParams
public static void warnUnusedParams(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Vox v, Set<String> analysed, boolean errorNotWarn) Emits a warning or an error if the source text of a voice contains parameters which are not analysed.- Parameters:
msg
- drain of messagesv
- the voiceanalysed
- set of parameter names which have been considerederrorNotWarn
- whether to produce an error message, not just a warning
-
veryFirstEventHasRequiredParameter
public static <T> boolean veryFirstEventHasRequiredParameter(MessageReceiver<SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>> msg, Event firstEv, Vox v, Map<Event, T> map, String pname) Checks whether the very first event of a particular voice has a necessary parameter.- Parameters:
msg
- the message receiver for the error casefirstEv
- the event to checkv
- the voice, for error message onlymap
- the parameter values, by events.pname
- the name of the parameter, for error message only.
-
highestLowerBound
Returns the highest/largest key contained in the map which is lower or equal to tke given value. Maybe null.
-