public class Rearranger
extends java.lang.Object
Constructor and Description |
---|
Rearranger() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
appendToElements(java.lang.String elementsSeparatedBySpaces,
java.lang.String stringToAppend)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces, and
returns a String in which 'stringToAppend' is appended to the end of each element.
|
static java.lang.String |
createStringFromElements(java.lang.String elementsSeparatedBySpaces,
int numElementsInResult)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces, and
randomly selects from the given elements to create a return String with
'numElementsInResult' number of elements.
|
static java.lang.String |
createUniqueElements(java.lang.String elementsSeparatedBySpaces)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces, and
returns a String in which each element in the input is represented only once.
|
static java.lang.String |
randomize(java.lang.String elementsSeparatedBySpaces)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces,
and returns a String that contains randomizes the order of the elements.
|
static java.lang.String |
rotate(java.lang.String elementsSeparatedBySpaces)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces,
and returns a String in which the first element is moved to the
back end of the String.
|
static java.lang.String |
rotate(java.lang.String elementsSeparatedBySpaces,
int numRotations)
Takes a String (intended to be a Staccato string of music notes, not including
other elements like voice or instrument selections), splits it on spaces,
and returns a String in which the first 'numRotations' elements are moved to the
back end of the String.
|
public static java.lang.String rotate(java.lang.String elementsSeparatedBySpaces)
public static java.lang.String rotate(java.lang.String elementsSeparatedBySpaces, int numRotations)
public static java.lang.String randomize(java.lang.String elementsSeparatedBySpaces)
public static java.lang.String createStringFromElements(java.lang.String elementsSeparatedBySpaces, int numElementsInResult)
public static java.lang.String appendToElements(java.lang.String elementsSeparatedBySpaces, java.lang.String stringToAppend)
public static java.lang.String createUniqueElements(java.lang.String elementsSeparatedBySpaces)