|
jlscp v0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.linuxsampler.lscp.AbstractParameter<T>
public abstract class AbstractParameter<T>
This class provides default implementation of the Parameter
interface.
Constructor Summary | |
---|---|
AbstractParameter()
|
Method Summary | |
---|---|
T |
getDefault()
Gets the default value for this parameter. |
java.lang.String[] |
getDependances()
Gets a String array with parameter's names this parameter depends on. |
java.lang.String |
getDescription()
Gets the description of this parameter. |
java.lang.String |
getName()
Gets the name of this parameter. |
T[] |
getPossibilities()
Gets a list of possible values for this parameter. |
java.lang.Number |
getRangeMax()
Gets the upper limit of the allowed value range for this parameter. |
java.lang.Number |
getRangeMin()
Gets the lower limit of the allowed value range for this parameter. |
ParameterType |
getType()
Gets the type of this parameter. |
T |
getValue()
Gets the current value of this parameter. |
boolean |
hasDependances()
Checks if this parameter depends on some other parameter(s). |
boolean |
hasPossibilities()
Determines whether this parameter has a list of possible values. |
boolean |
hasRangeMax()
Determines whether this parameter has an upper limit. |
boolean |
hasRangeMin()
Determines whether this parameter has a lower limit. |
boolean |
isBoolean()
Determines whether this parameter contains boolean value. |
boolean |
isBooleanList()
Determines whether this parameter contains list of boolean values. |
boolean |
isFixed()
Defines if this parameter can be altered. |
boolean |
isFloat()
Determines whether this parameter contains float value. |
boolean |
isFloatList()
Determines whether this parameter contains list of float values. |
boolean |
isInteger()
Determines whether this parameter contains integer value. |
boolean |
isIntegerList()
Determines whether this parameter contains list of integer values. |
boolean |
isMandatory()
Defines if this parameter must be given when the device is to be created. |
boolean |
isMultiplicity()
Defines if this parameter allows only one value or list of values. |
boolean |
isString()
Determines whether this parameter contains string value. |
boolean |
isStringList()
Determines whether this parameter contains list of string values. |
boolean |
parse(java.lang.String s)
Parses a line of text. |
protected void |
parseLines(java.lang.String[] lnS)
Parses the specified lines. |
T |
setDefault(T dflt)
Sets the default value for this parameter. |
void |
setDescription(java.lang.String desc)
Sets the description of this parameter. |
void |
setMultiplicity(boolean b)
Sets if this parameter allows only one value or list of values. |
void |
setName(java.lang.String name)
Sets the name of this parameter. |
void |
setPossibilities(T[] pos)
Sets the list of possible values for this parameter. |
void |
setRangeMax(java.lang.Number max)
Sets the upper limit of the allowed value range for this parameter. |
void |
setRangeMin(java.lang.Number min)
Sets the lower limit of the allowed value range for this parameter. |
void |
setType(ParameterType type)
Sets the type of this parameter. |
void |
setValue(T val)
Sets the current value of this parameter. |
java.lang.String |
toString()
Returns the name of this parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.linuxsampler.lscp.Parameter |
---|
getStringValue, parseValue |
Constructor Detail |
---|
public AbstractParameter()
Method Detail |
---|
public java.lang.String getName()
getName
in interface Parameter<T>
public void setName(java.lang.String name)
setName
in interface Parameter<T>
name
- A String
object containing the new name for this parameter.public java.lang.String getDescription()
getDescription
in interface Parameter<T>
public void setDescription(java.lang.String desc)
desc
- A String
instance containing the description of this parameter.public ParameterType getType()
getType
in interface Parameter<T>
public void setType(ParameterType type)
type
- The type of this parameter.public T getValue()
getValue
in interface Parameter<T>
public void setValue(T val)
setValue
in interface Parameter<T>
val
- The new value for this parameter.public boolean isBoolean()
true
if this parameter contains boolean value,
false
otherwise.public boolean isInteger()
true
if this parameter contains integer value,
false
otherwise.public boolean isFloat()
true
if this parameter contains float value,
false
otherwise.public boolean isString()
true
if this parameter contains string value,
false
otherwise.public boolean isBooleanList()
true
if this parameter contains list of boolean values,
false
otherwise.public boolean isIntegerList()
true
if this parameter contains list of integer values,
false
otherwise.public boolean isFloatList()
true
if this parameter contains list of float values,
false
otherwise.public boolean isStringList()
true
if this parameter contains list of string values,
false
otherwise.public boolean isFixed()
isFixed
in interface Parameter<T>
true
if the parameter is readonly and false
if the parameter can be altered.public boolean isMultiplicity()
isMultiplicity
in interface Parameter<T>
false
if this parameter allows only one value and true
if allows a list of values.public void setMultiplicity(boolean b)
b
- true
if this parameter allows list of values,
false
otherwise.public boolean isMandatory()
isMandatory
in interface Parameter<T>
true
if this parameter must be given when the device
is to be created and false
otherwise.public java.lang.String[] getDependances()
String
array with parameter's names this parameter depends on.
getDependances
in interface Parameter<T>
String
array with parameter's names this parameter depends on
or null
if this parameter has no dependances.public boolean hasDependances()
hasDependances
in interface Parameter<T>
true
if this parameter depends on some other parameter(s)
and false
otherwise.public boolean parse(java.lang.String s) throws LscpException
parse
in interface Parseable
s
- A string to be parsed.
true
if the line has been processed, false
otherwise.
LscpException
- If some error occurs.protected void parseLines(java.lang.String[] lnS) throws LscpException
lnS
- The lines to be parsed.
LscpException
- If some error occurs.public T getDefault()
getDefault
in interface Parameter<T>
public T setDefault(T dflt)
dflt
- Specifies the default value for this parameter.public java.lang.Number getRangeMin()
getRangeMin
in interface Parameter<T>
null
if the parameter doesn't have lower limit.public void setRangeMin(java.lang.Number min)
min
- Specifies the lower limit of the allowed value range for this parameter.public java.lang.Number getRangeMax()
getRangeMax
in interface Parameter<T>
null
if the parameter doesn't have upper limit.public void setRangeMax(java.lang.Number max)
max
- Specifies the upper limit of the allowed value range for this parameter.public T[] getPossibilities()
getPossibilities
in interface Parameter<T>
public void setPossibilities(T[] pos)
pos
- The new list of possible values for this parameter.public boolean hasRangeMin()
hasRangeMin
in interface Parameter<T>
true
if this parameter has a lower limit,
false
otherwise.public boolean hasRangeMax()
hasRangeMax
in interface Parameter<T>
true
if this parameter has an upper limit,
false
otherwise.public boolean hasPossibilities()
hasPossibilities
in interface Parameter<T>
true
if this parameter has a list of possible values,
false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
|
jlscp v0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |