plugins.adufour.vars.lang
Class VarIntegerArrayNative
java.lang.Object
plugins.adufour.vars.lang.Var<A>
plugins.adufour.vars.lang.VarGenericArray<int[]>
plugins.adufour.vars.lang.VarIntegerArrayNative
- All Implemented Interfaces:
- icy.file.xml.XMLPersistent, ArrayType, VarListener<int[]>
public class VarIntegerArrayNative
- extends VarGenericArray<int[]>
Class defining a variable with a native array of type int[]. This class should be
preferred to VarIntegerArray for optimized performances on large arrays
- Author:
- Alexandre Dufour
|
Method Summary |
VarEditor<int[]> |
createVarEditor()
Creates a new VarEditor object that allows the user to graphically adjust the value
of this variable. |
int[] |
getValue(boolean forbidNull)
|
java.lang.Object |
parseComponent(java.lang.String s)
Parse a string representing an element of the underlying array. |
| Methods inherited from class plugins.adufour.vars.lang.Var |
addListener, createVarViewer, fireVariableChanged, fireVariableChanged, getDefaultEditorModel, getDefaultValue, getIterableReferrers, getName, getReference, getReferencingPolicy, getReferrers, getType, getTypeAsString, getValueAsString, getValueAsString, isEnabled, isOptional, isReferenced, loadFromXML, prettyPrint, referenceChanged, removeListener, removeListeners, saveToXML, setDefaultEditorModel, setEnabled, setOptional, setReference, setReferencingPolicy, setValue, toString, valueChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
VarIntegerArrayNative
public VarIntegerArrayNative(java.lang.String name,
int[] defaultValue)
createVarEditor
public VarEditor<int[]> createVarEditor()
- Description copied from class:
Var
- Creates a new
VarEditor object that allows the user to graphically adjust the value
of this variable. By default this editor is an empty label for generic types, but this method
can be overridden to provide a custom editor.
- Overrides:
createVarEditor in class Var<int[]>
- Returns:
- the variable editor embarking the graphical component
parseComponent
public java.lang.Object parseComponent(java.lang.String s)
- Description copied from class:
VarGenericArray
- Parse a string representing an element of the underlying array. Note that this method throws
an
UnsupportedOperationException by default, therefore the implementation must
be provided by overriding classes
- Specified by:
parseComponent in interface ArrayType- Overrides:
parseComponent in class VarGenericArray<int[]>
- Parameters:
s - the string to parse
- Returns:
- a primitive type representing the given string
getValue
public int[] getValue(boolean forbidNull)
- Overrides:
getValue in class Var<int[]>
- Parameters:
forbidNull - true to throw an exception if the underlying value is null
- Returns:
- the value stored in this variable, or the value in the referenced variable if the
reference is not null. Note that this method will throw a
VarException if the
forbidNull argument is true - See Also:
Var.getReference()