de.cau.cs.kieler.core.kivi
Class CombinationParameter

java.lang.Object
  extended by de.cau.cs.kieler.core.kivi.CombinationParameter

public class CombinationParameter
extends Object

Describes a parameter of a combination.

Rating red

Nested Class Summary
static interface CombinationParameter.IParameterType
          Honor type-specific issues.
 
Field Summary
static CombinationParameter.IParameterType BOOLEAN_TYPE
          Default parameter type for booleans.
static CombinationParameter.IParameterType DOUBLE_TYPE
          Default parameter type for doubles.
static CombinationParameter.IParameterType FLOAT_TYPE
          Default parameter type for floats.
static CombinationParameter.IParameterType INTEGER_TYPE
          Default parameter type for integers.
static CombinationParameter.IParameterType RGB_TYPE
          Default parameter type for RGB color values.
static CombinationParameter.IParameterType STRING_TYPE
          Default parameter type for strings.
 
Constructor Summary
CombinationParameter(String k, IPreferenceStore store, String n, String d, Object def, CombinationParameter.IParameterType t)
          Create a new combination parameter.
 
Method Summary
 Object getDefaultValue()
          Get the default value of this parameter.
 String getDescription()
          Get a readable description for this parameter.
 String getKey()
          Get the preference key.
 String getName()
          Get a readable name for this parameter.
static CombinationParameter[] getParameters(Class<? extends ICombination> combination)
          Retrieve the combination parameters from a combination class.
 IPreferenceStore getPreferenceStore()
          Get the preference store used to save this key-value pair.
 Class<?> getType()
          Get the type of this parameter.
 void initialize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING_TYPE

public static final CombinationParameter.IParameterType STRING_TYPE
Default parameter type for strings.


INTEGER_TYPE

public static final CombinationParameter.IParameterType INTEGER_TYPE
Default parameter type for integers.


FLOAT_TYPE

public static final CombinationParameter.IParameterType FLOAT_TYPE
Default parameter type for floats.


DOUBLE_TYPE

public static final CombinationParameter.IParameterType DOUBLE_TYPE
Default parameter type for doubles.


BOOLEAN_TYPE

public static final CombinationParameter.IParameterType BOOLEAN_TYPE
Default parameter type for booleans.


RGB_TYPE

public static final CombinationParameter.IParameterType RGB_TYPE
Default parameter type for RGB color values.

Constructor Detail

CombinationParameter

public CombinationParameter(String k,
                            IPreferenceStore store,
                            String n,
                            String d,
                            Object def,
                            CombinationParameter.IParameterType t)
Create a new combination parameter.

Parameters:
k - the preference key
store - the preference store
n - the readable name
d - the readable description
def - the default value
t - The parameter type
Method Detail

getKey

public String getKey()
Get the preference key.

Returns:
the key

getPreferenceStore

public IPreferenceStore getPreferenceStore()
Get the preference store used to save this key-value pair.

Returns:
the preference store

getName

public String getName()
Get a readable name for this parameter.

Returns:
the name

getDescription

public String getDescription()
Get a readable description for this parameter.

Returns:
the description

getType

public Class<?> getType()
Get the type of this parameter.

Returns:
the type

getDefaultValue

public Object getDefaultValue()
Get the default value of this parameter.

Returns:
the default value

initialize

public void initialize()

getParameters

public static CombinationParameter[] getParameters(Class<? extends ICombination> combination)
Retrieve the combination parameters from a combination class.

Parameters:
combination - the combination class to look in
Returns:
its combination parameters, or an empty array if there are none