public class IntListParameter extends ListParameter<IntListParameter,int[]>
LIST_SEP, SPLIT, VECTOR_SEP, VECTOR_SPLIT
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
Constructor and Description |
---|
IntListParameter(OptionID optionID)
Constructs an integer list parameter
|
IntListParameter(OptionID optionID,
boolean optional)
Constructs an integer list parameter
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultValueAsString()
Get the default value as string.
|
java.lang.String |
getSyntax()
Returns a string representation of the parameter's type.
|
long[] |
getValueAsBitSet()
Get the values as a bitmask.
|
java.lang.String |
getValueAsString()
Get the value as string.
|
protected int[] |
parseValue(java.lang.Object obj)
Parse a given value into the destination type.
|
int |
size()
Size of the list.
|
addConstraint, describeValues, getConstraints, getDefaultValue, getOptionID, getShortDescription, getValue, hasDefaultValue, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, validate
public IntListParameter(OptionID optionID, boolean optional)
optionID
- the unique id of this parameteroptional
- specifies if this parameter is an optional parameterpublic IntListParameter(OptionID optionID)
optionID
- the unique id of this parameterpublic java.lang.String getValueAsString()
Parameter
null
getValueAsString
in interface Parameter<int[]>
getValueAsString
in class AbstractParameter<IntListParameter,int[]>
public java.lang.String getDefaultValueAsString()
Parameter
getDefaultValueAsString
in interface Parameter<int[]>
getDefaultValueAsString
in class AbstractParameter<IntListParameter,int[]>
protected int[] parseValue(java.lang.Object obj) throws ParameterException
AbstractParameter
parseValue
in class AbstractParameter<IntListParameter,int[]>
obj
- Object to parse (may be a string representation!)ParameterException
- when the object cannot be parsed.public int size()
ListParameter
size
in class ListParameter<IntListParameter,int[]>
public java.lang.String getSyntax()
getSyntax
in interface Parameter<int[]>
getSyntax
in class AbstractParameter<IntListParameter,int[]>
public long[] getValueAsBitSet()
BitsUtil
Copyright © 2019 ELKI Development Team. License information.