Package org.jfugue.pattern
Class ReplacementFormatUtil
- java.lang.Object
-
- org.jfugue.pattern.ReplacementFormatUtil
-
public class ReplacementFormatUtil extends java.lang.Object
This utility takes replacement strings with dollar signs, like "$0q $1h $2w", and replaces each $ index with a value from the array of candidates. $_ is replaced with the underscoreReplacement. Returns the resulting Pattern. Special replacements, like $R or $-B, can be specified in the specialReplacement map. Current known users include ChordProgression, Intervals, and BrokenChordPreprocessor.
-
-
Constructor Summary
Constructors Constructor Description ReplacementFormatUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Pattern
replaceDollarsWithCandidates(java.lang.String sequence, PatternProducer[] candidates, PatternProducer underscoreReplacement)
static Pattern
replaceDollarsWithCandidates(java.lang.String sequence, PatternProducer[] candidates, PatternProducer underscoreReplacement, java.util.Map<java.lang.String,PatternProducer> specialReplacers, java.lang.String inputSeparator, java.lang.String outputSeparator, java.lang.String finalThingToAppend)
-
-
-
Method Detail
-
replaceDollarsWithCandidates
public static Pattern replaceDollarsWithCandidates(java.lang.String sequence, PatternProducer[] candidates, PatternProducer underscoreReplacement)
-
replaceDollarsWithCandidates
public static Pattern replaceDollarsWithCandidates(java.lang.String sequence, PatternProducer[] candidates, PatternProducer underscoreReplacement, java.util.Map<java.lang.String,PatternProducer> specialReplacers, java.lang.String inputSeparator, java.lang.String outputSeparator, java.lang.String finalThingToAppend)
-
-