public class CommandOption
extends java.lang.Object
Objects of this class represent a MidicaPL command option. It can be:
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private java.lang.String |
rawName |
private java.lang.String |
rawValue |
private java.lang.Object |
value |
Constructor and Description |
---|
CommandOption() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCondition()
Returns a condition for an if or elsif option.
|
java.lang.Float |
getDuration()
Returns the duration.
|
java.lang.String |
getLength()
Returns the note length.
|
java.lang.String |
getLyrics()
Returns a lyrics syllable.
|
java.lang.String |
getName()
Returns the (unified) option name.
|
java.lang.Integer |
getQuantity()
Returns the quantity.
|
java.lang.String |
getRawName()
Returns the raw name, like it is used in MidicaPL syntax.
|
java.lang.String |
getRawValue()
Returns the string representation of the value, if avaliable, or null otherwise.
|
int |
getShift()
Returns a shift modifier.
|
int |
getTremolo()
Returns a tremolo modifier.
|
java.lang.String |
getTuplet()
Returns a tuplet modifier.
|
java.lang.Integer |
getVelocity()
Returns the velocity.
|
void |
set(java.lang.String name,
java.lang.Object value,
java.lang.String rawName,
java.lang.String rawValue)
Initializes the option with a name and a value.
|
private java.lang.String name
private java.lang.Object value
private java.lang.String rawName
private java.lang.String rawValue
public void set(java.lang.String name, java.lang.Object value, java.lang.String rawName, java.lang.String rawValue) throws ParseException
Initializes the option with a name and a value.
name
- Option name in a canonized form, independent from the current syntax configuration.value
- Option value.rawName
- Option name according to the current syntax configuration.rawValue
- Option value as a string, according to the current MidicaPL configuration.ParseException
- if the given name is invalid.public java.lang.String getRawName()
Returns the raw name, like it is used in MidicaPL syntax.
public java.lang.String getName()
Returns the (unified) option name.
public java.lang.String getRawValue()
Returns the string representation of the value, if avaliable, or null otherwise.
public java.lang.Integer getQuantity()
Returns the quantity.
public java.lang.String getLength()
Returns the note length.
public java.lang.Integer getVelocity()
Returns the velocity.
public java.lang.Float getDuration()
Returns the duration.
public java.lang.String getLyrics()
Returns a lyrics syllable.
public java.lang.String getTuplet()
Returns a tuplet modifier.
public int getTremolo()
Returns a tremolo modifier.
public int getShift()
Returns a shift modifier.
public java.lang.String getCondition()
Returns a condition for an if or elsif option.