plugins.adufour.vars.lang
Class VarFloat

java.lang.Object
  extended by plugins.adufour.vars.lang.Var<N>
      extended by plugins.adufour.vars.lang.VarNumber<java.lang.Float>
          extended by plugins.adufour.vars.lang.VarFloat
All Implemented Interfaces:
icy.file.xml.XMLPersistent, java.lang.Comparable<java.lang.Float>, VarListener<java.lang.Float>

public class VarFloat
extends VarNumber<java.lang.Float>


Field Summary
 
Fields inherited from class plugins.adufour.vars.lang.Var
listeners, NO_VALUE, type, XML_KEY_ID
 
Constructor Summary
VarFloat(java.lang.String name, float defaultValue)
           
VarFloat(java.lang.String name, java.lang.Float defaultValue)
           
 
Method Summary
 int compareTo(java.lang.Float f)
           
 java.lang.Float getValue()
          Returns a Float representing the variable value.
NOTE: if the current variable references a variable of different (wider) type, truncation will occur
 java.lang.Float parse(java.lang.String s)
          Parses the given String into the current type
 
Methods inherited from class plugins.adufour.vars.lang.VarNumber
createVarEditor, isAssignableFrom
 
Methods inherited from class plugins.adufour.vars.lang.Var
addListener, createVarViewer, fireVariableChanged, fireVariableChanged, getDefaultEditorModel, getDefaultValue, getIterableReferrers, getName, getReference, getReferencingPolicy, getReferrers, getType, getTypeAsString, getValue, 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
 

Constructor Detail

VarFloat

public VarFloat(java.lang.String name,
                java.lang.Float defaultValue)

VarFloat

public VarFloat(java.lang.String name,
                float defaultValue)
Method Detail

parse

public java.lang.Float parse(java.lang.String s)
Description copied from class: Var
Parses the given String into the current type

Overrides:
parse in class Var<java.lang.Float>
Returns:
The variable value corresponding to the given string

compareTo

public int compareTo(java.lang.Float f)

getValue

public java.lang.Float getValue()
Returns a Float representing the variable value.
NOTE: if the current variable references a variable of different (wider) type, truncation will occur

Overrides:
getValue in class Var<java.lang.Float>
Returns:
the value stored in this variable, or the value in the referenced variable if the reference is not null. Note that this method may return null. To forbid null values, use the Var.getValue(boolean) method instead.
See Also:
Var.getReference()