jlscp
v0.8

org.linuxsampler.lscp
Interface Parameter<T>

All Known Implementing Classes:
AbstractParameter, BoolListParameter, BoolParameter, FloatListParameter, FloatParameter, IntListParameter, IntParameter, StringListParameter, StringParameter

public interface Parameter<T>

Defines the generic properties that every parameter should have.


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.
 java.lang.String getStringValue()
          Gets a character string representation of the parameter's value.
 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 isFixed()
          Defines if this parameter can be altered.
 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.
 void parseValue(java.lang.String s)
          Parses the specified character string and sets the value of this parameter with the parsed result.
 void setName(java.lang.String name)
          Sets the name of this parameter.
 void setValue(T val)
          Sets the current value of this parameter.
 

Method Detail

getName

java.lang.String getName()
Gets the name of this parameter.

Returns:
The name of this parameter.

setName

void setName(java.lang.String name)
Sets the name of this parameter.

Parameters:
name - A String instance containing the new name for this parameter.

parseValue

void parseValue(java.lang.String s)
                throws LscpException
Parses the specified character string and sets the value of this parameter with the parsed result.

Parameters:
s - A character string containing the value to be parsed.
Throws:
LscpException - If the parsing failed.

getStringValue

java.lang.String getStringValue()
Gets a character string representation of the parameter's value.

Returns:
A character string representation of the parameter's value.

getDescription

java.lang.String getDescription()
Gets the description of this parameter.

Returns:
The description of this parameter.

getType

ParameterType getType()
Gets the type of this parameter.

Returns:
The type of this parameter.

getValue

T getValue()
Gets the current value of this parameter.

Returns:
The current value of this parameter.

setValue

void setValue(T val)
Sets the current value of this parameter.

Parameters:
val - The new value for this parameter.

getDefault

T getDefault()
Gets the default value for this parameter.

Returns:
The default value for this parameter.

isFixed

boolean isFixed()
Defines if this parameter can be altered.

Returns:
true if the parameter is readonly and false if the parameter can be altered.

isMultiplicity

boolean isMultiplicity()
Defines if this parameter allows only one value or list of values.

Returns:
false if this parameter allows only one value and true if allows a list of values.

isMandatory

boolean isMandatory()
Defines if this parameter must be given when the device is to be created.

Returns:
true if this parameter must be given when the device is to be created and false otherwise.

hasDependances

boolean hasDependances()
Checks if this parameter depends on some other parameter(s).

Returns:
true if this parameter depends on some other parameter(s) and false otherwise.

getDependances

java.lang.String[] getDependances()
Gets a String array with parameter's names this parameter depends on.

Returns:
A String array with parameter's names this parameter depends on or null if this parameter has no dependances.

hasRangeMin

boolean hasRangeMin()
Determines whether this parameter has a lower limit.

Returns:
true if this parameter has a lower limit, false otherwise.

getRangeMin

java.lang.Number getRangeMin()
Gets the lower limit of the allowed value range for this parameter.

Returns:
The lower limit of the allowed value range for this parameter or null if the parameter doesn't have lower limit.

hasRangeMax

boolean hasRangeMax()
Determines whether this parameter has an upper limit.

Returns:
true if this parameter has an upper limit, false otherwise.

getRangeMax

java.lang.Number getRangeMax()
Gets the upper limit of the allowed value range for this parameter.

Returns:
The upper limit of the allowed value range for this parameter or null if the parameter doesn't have upper limit.

hasPossibilities

boolean hasPossibilities()
Determines whether this parameter has a list of possible values.

Returns:
true if this parameter has a list of possible values, false otherwise.

getPossibilities

T[] getPossibilities()
Gets a list of possible values for this parameter.

Returns:
A list of possible values for this parameter.

jlscp
v0.8

Copyright © 2009 Grigor Iliev. All rights reserved.