de.lmu.ifi.dbs.elki.gui.util
Class DynamicParameters

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.gui.util.DynamicParameters

public class DynamicParameters
extends Object

Wrapper around a set of parameters for ELKI, that may not yet be complete or correct.


Nested Class Summary
 class DynamicParameters.Node
          Node in the option tree (well, actually list)
static class DynamicParameters.RemainingOptions
          Dummy option class that represents unhandled options
 
Field Summary
static int BIT_DEFAULT_VALUE
          Bit for an option with a default value
static int BIT_INCOMPLETE
          Bit for an option that should be set
static int BIT_INVALID
          Bit for an option with an invalid value
static int BIT_OPTIONAL
          Bit for an optional value
static int BIT_SYNTAX_ERROR
          Bit for an option containing an syntax error
protected  ArrayList<DynamicParameters.Node> parameters
          Parameter storage
protected static OptionID REMAINING_OPTIONS_ID
          OptionID for unrecognized options.
static String STRING_OPTIONAL
          Pseudo-value used in options that are optional, to unset.
static String STRING_USE_DEFAULT
          Pseudo-value used in dropdowns for options that have a default value
 
Constructor Summary
DynamicParameters()
          Constructor
 
Method Summary
 void addParameter(Parameter<?,?> option, String value, BitSet bits, int depth)
          Add a single parameter to the list
 DynamicParameters.Node getNode(int rowIndex)
          Get the node in this nth row of the flattened tree.
 ArrayList<String> serializeParameters()
          Serialize parameters into an array list to pass to setParameters()
 int size()
          Get the size
 void updateFromTrackParameters(TrackParameters track)
          Update the Parameter list from the collected options of an ELKI context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIT_INCOMPLETE

public static final int BIT_INCOMPLETE
Bit for an option that should be set

See Also:
Constant Field Values

BIT_INVALID

public static final int BIT_INVALID
Bit for an option with an invalid value

See Also:
Constant Field Values

BIT_SYNTAX_ERROR

public static final int BIT_SYNTAX_ERROR
Bit for an option containing an syntax error

See Also:
Constant Field Values

BIT_OPTIONAL

public static final int BIT_OPTIONAL
Bit for an optional value

See Also:
Constant Field Values

BIT_DEFAULT_VALUE

public static final int BIT_DEFAULT_VALUE
Bit for an option with a default value

See Also:
Constant Field Values

STRING_USE_DEFAULT

public static final String STRING_USE_DEFAULT
Pseudo-value used in dropdowns for options that have a default value

See Also:
Constant Field Values

STRING_OPTIONAL

public static final String STRING_OPTIONAL
Pseudo-value used in options that are optional, to unset.

See Also:
Constant Field Values

parameters

protected ArrayList<DynamicParameters.Node> parameters
Parameter storage


REMAINING_OPTIONS_ID

protected static OptionID REMAINING_OPTIONS_ID
OptionID for unrecognized options.

Constructor Detail

DynamicParameters

public DynamicParameters()
Constructor

Method Detail

size

public int size()
Get the size

Returns:
number of parameters

updateFromTrackParameters

public void updateFromTrackParameters(TrackParameters track)
Update the Parameter list from the collected options of an ELKI context

Parameters:
track - Tracked Parameters

addParameter

public void addParameter(Parameter<?,?> option,
                         String value,
                         BitSet bits,
                         int depth)
Add a single parameter to the list

Parameters:
option - Option
value - Value
bits - Bits
depth - Depth

serializeParameters

public ArrayList<String> serializeParameters()
Serialize parameters into an array list to pass to setParameters()

Returns:
Array list of String parameters.

getNode

public DynamicParameters.Node getNode(int rowIndex)
Get the node in this nth row of the flattened tree.

Parameters:
rowIndex - row index
Returns:
tree node

Release 0.4.0 (2011-09-20_1324)