com.flexive.shared.value
Class FxFloat

java.lang.Object
  extended by com.flexive.shared.value.FxValue<java.lang.Float,FxFloat>
      extended by com.flexive.shared.value.FxFloat
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FxValue>

public class FxFloat
extends FxValue<java.lang.Float,FxFloat>
implements java.io.Serializable

A multilingual Float, internally represented as Float

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Field Summary
static java.lang.Float EMPTY
           
 
Fields inherited from class com.flexive.shared.value.FxValue
DEFAULT_MULTILANGUAGE, defaultLanguage, emptyTranslations, multiLanguage, singleValue, translations
 
Constructor Summary
FxFloat(boolean multiLanguage, java.lang.Float value)
          Constructor
FxFloat(boolean multiLanguage, long defaultLanguage, java.lang.Float value)
          Constructor
FxFloat(boolean multiLanguage, long defaultLanguage, java.util.Map<java.lang.Long,java.lang.Float> translations)
          Constructor
FxFloat(boolean multiLanguage, java.util.Map<java.lang.Long,java.lang.Float> translations)
          Constructor
FxFloat(java.lang.Float value)
          Constructor
FxFloat(FxValue<java.lang.Float,FxFloat> clone)
          Constructor
FxFloat(long defaultLanguage, boolean multiLanguage)
          Constructor
FxFloat(long defaultLanguage, java.lang.Float value)
          Constructor
FxFloat(long defaultLanguage, java.util.Map<java.lang.Long,java.lang.Float> translations)
          Constructor
FxFloat(java.util.Map<java.lang.Long,java.lang.Float[]> translations, int pos)
          Constructor - create value from an array of translations
FxFloat(java.util.Map<java.lang.Long,java.lang.Float> translations)
          Constructor
 
Method Summary
 int compareTo(FxValue o)
          A generic comparable implementation based on the value's string representation.
 FxFloat copy()
          Creates a copy of the given object (useful if the actual type is unknown).
 java.lang.Float fromString(java.lang.String value)
          Evaluates the given string value to an object of type T.
 java.lang.Float getEmptyValue()
          Returns an empty value object for this FxValue type.
 java.lang.Class<java.lang.Float> getValueClass()
          Return the class instance of the value type.
 
Methods inherited from class com.flexive.shared.value.FxValue
clearDefaultLanguage, equals, getBestTranslation, getBestTranslation, getBestTranslation, getBestTranslation, getDefaultLanguage, getDefaultTranslation, getErrorValue, getIsEmpty, getMaxInputLength, getSelectedLanguage, getSqlValue, getStringValue, getTranslatedLanguages, getTranslation, getTranslation, getXPath, getXPathName, hasDefaultLanguage, hashCode, isAcceptsEmptyDefaultTranslations, isDefaultLanguage, isEmpty, isImmutableValueType, isMultiLanguage, isReadOnly, isTranslationEmpty, isTranslationEmpty, isValid, removeLanguage, setDefaultLanguage, setDefaultLanguage, setDefaultTranslation, setEmpty, setEmpty, setMaxInputLength, setReadOnly, setSelectedLanguage, setTranslation, setTranslation, setValue, setXPath, toString, translationExists
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final java.lang.Float EMPTY
Constructor Detail

FxFloat

public FxFloat(long defaultLanguage,
               boolean multiLanguage)
Constructor

Parameters:
multiLanguage - multilanguage value?
defaultLanguage - the default language

FxFloat

public FxFloat(boolean multiLanguage,
               long defaultLanguage,
               java.util.Map<java.lang.Long,java.lang.Float> translations)
Constructor

Parameters:
multiLanguage - multilanguage value?
defaultLanguage - the default language
translations - HashMap containing language->translation mapping

FxFloat

public FxFloat(long defaultLanguage,
               java.util.Map<java.lang.Long,java.lang.Float> translations)
Constructor

Parameters:
defaultLanguage - the default language
translations - HashMap containing language->translation mapping

FxFloat

public FxFloat(boolean multiLanguage,
               java.util.Map<java.lang.Long,java.lang.Float> translations)
Constructor

Parameters:
multiLanguage - multilanguage value?
translations - HashMap containing language->translation mapping

FxFloat

public FxFloat(java.util.Map<java.lang.Long,java.lang.Float> translations)
Constructor

Parameters:
translations - HashMap containing language->translation mapping

FxFloat

public FxFloat(java.util.Map<java.lang.Long,java.lang.Float[]> translations,
               int pos)
Constructor - create value from an array of translations

Parameters:
translations - HashMap containing language->translation mapping
pos - position (index) in the array to use

FxFloat

public FxFloat(boolean multiLanguage,
               long defaultLanguage,
               java.lang.Float value)
Constructor

Parameters:
multiLanguage - multilanguage value?
defaultLanguage - the default language
value - single initializing value

FxFloat

public FxFloat(long defaultLanguage,
               java.lang.Float value)
Constructor

Parameters:
defaultLanguage - the default language
value - single initializing value

FxFloat

public FxFloat(boolean multiLanguage,
               java.lang.Float value)
Constructor

Parameters:
multiLanguage - multilanguage value?
value - single initializing value

FxFloat

public FxFloat(java.lang.Float value)
Constructor

Parameters:
value - single initializing value

FxFloat

public FxFloat(FxValue<java.lang.Float,FxFloat> clone)
Constructor

Parameters:
clone - original FxValue to be cloned
Method Detail

fromString

public java.lang.Float fromString(java.lang.String value)
Evaluates the given string value to an object of type T.

Specified by:
fromString in class FxValue<java.lang.Float,FxFloat>
Parameters:
value - string value to be evaluated
Returns:
the value interpreted as T

copy

public FxFloat copy()
Creates a copy of the given object (useful if the actual type is unknown).

Specified by:
copy in class FxValue<java.lang.Float,FxFloat>
Returns:
a copy of the given object (useful if the actual type is unknown).

getValueClass

public java.lang.Class<java.lang.Float> getValueClass()
Return the class instance of the value type.

Specified by:
getValueClass in class FxValue<java.lang.Float,FxFloat>
Returns:
the class instance of the value type.

getEmptyValue

public java.lang.Float getEmptyValue()
Returns an empty value object for this FxValue type.

Specified by:
getEmptyValue in class FxValue<java.lang.Float,FxFloat>
Returns:
an empty value object for this FxValue type.

compareTo

public int compareTo(FxValue o)
Description copied from class: FxValue
A generic comparable implementation based on the value's string representation.

Specified by:
compareTo in interface java.lang.Comparable<FxValue>
Overrides:
compareTo in class FxValue<java.lang.Float,FxFloat>
Parameters:
o - the other object
Returns:
see Comparable.compareTo(T).