LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyUnits

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by leon.info.LyUnits
All Implemented Interfaces:
java.lang.Cloneable, LyCommentInterface

public class LyUnits
extends LyInfo

This class defines a list of units.


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __VERSION
           
 
Method Summary
 java.lang.Class<?> getConverterClass()
          Gets the class to convert.
 java.lang.String getJavaName()
          Gets java class name corresponding to this units list.
 java.lang.String getName()
          Accessor for name of this units list.
 LyUnit getReferenceUnit()
          Gets reference unit (unit with factor=1 and offset=0).
 LyUnit getUnit(int index)
          Fetches the unit at the specified index.
 LyUnit getUnit(java.lang.String unitId)
          Retrieve a unit in units list from its id.
 int getUnitCount()
          Return the number of units associated to this field.
 LyInfoList<LyUnit> getUnits()
          Get field units.
 boolean isConvert()
          Gets the convert flag for this units list.
 void setJavaName(java.lang.String javaName)
          Sets java class name corresponding to this units list.
 
Methods inherited from class leon.info.LyInfo
getAlias, getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString
 
Methods inherited from class leon.info.LyTag
clone, getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Method Detail

getUnitCount

public int getUnitCount()
Return the number of units associated to this field.

Returns:
Number of units of this field.

getUnit

public LyUnit getUnit(int index)
Fetches the unit at the specified index.

Parameters:
index - Index of the searched unit.
Returns:
The requested unit if found, or null if it could not be found.

getUnits

public LyInfoList<LyUnit> getUnits()
Get field units.


getName

public final java.lang.String getName()
Accessor for name of this units list.

Overrides:
getName in class LyInfo
Returns:
Name of this units list.

getJavaName

public java.lang.String getJavaName()
Gets java class name corresponding to this units list. Name of the class used to convert values between units of this list.

Returns:
Name of the java class corresponding to this units list.

getConverterClass

public java.lang.Class<?> getConverterClass()
Gets the class to convert.

Returns:
The class of the converter.

getReferenceUnit

public LyUnit getReferenceUnit()
Gets reference unit (unit with factor=1 and offset=0).

Returns:
The reference unit if found, the first one otherwise.

isConvert

public boolean isConvert()
Gets the convert flag for this units list.

Returns:
The convert flag of this units list.

setJavaName

public void setJavaName(java.lang.String javaName)
Sets java class name corresponding to this units list.

Parameters:
javaName - Name of the java class corresponding to this units list.

getUnit

public LyUnit getUnit(java.lang.String unitId)
Retrieve a unit in units list from its id.

Parameters:
unitId - Id of the searched unit.
Returns:
Unit corresponding to the id if found, null otherwise.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com