jhplot
Class UConverter
- java.lang.Object
 - 
- jhplot.UConverter
 
 
- 
public class UConverter extends java.lang.ObjectClass to convert various units of measure. 
- 
- 
Constructor Summary
Constructors Constructor and Description UConverter()Initialise convertionsUConverter(java.lang.String type)Initialise conversion if you know the type 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleconvert(double value, java.lang.String fromUnit, java.lang.String toUnit)Perform convertion of values fomr one unit to another.com.edsdev.jconvert.domain.ConversionTypefindType(java.lang.String conversionUnit)Find and set conversion type.com.edsdev.jconvert.presentation.ConversionTypeDatagetConversionType()Get current convertion type.com.edsdev.jconvert.presentation.ConversionTypeDatagetConversionType(java.lang.String conversionType)Get convertion typejava.util.List<com.edsdev.jconvert.domain.ConversionType>getDomanData()Get domain datajava.lang.String[]getTypes()Get all conversion types as stringsvoidsetConversionType(java.lang.String conversionType)Set convertion type.java.lang.StringtoString()Show as a string all conversion types 
 - 
 
- 
- 
Constructor Detail
- 
UConverter
public UConverter()
Initialise convertions 
- 
UConverter
public UConverter(java.lang.String type)
Initialise conversion if you know the type- Parameters:
 type- unit type.
 
 - 
 
- 
Method Detail
- 
convert
public double convert(double value, java.lang.String fromUnit, java.lang.String toUnit)Perform convertion of values fomr one unit to another.- Parameters:
 value- valuefromUnit- original unittoUnit- unit to convert- Returns:
 - value after convertion
 
 
- 
toString
public java.lang.String toString()
Show as a string all conversion types- Overrides:
 toStringin classjava.lang.Object- Returns:
 - string with all convertion types;
 
 
- 
getTypes
public java.lang.String[] getTypes()
Get all conversion types as strings- Returns:
 - array with conversion styles.
 
 
- 
findType
public com.edsdev.jconvert.domain.ConversionType findType(java.lang.String conversionUnit)
Find and set conversion type.- Parameters:
 conversionUnit- convertion unit- Returns:
 - conversion type
 
 
- 
getConversionType
public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType(java.lang.String conversionType)
Get convertion type- Parameters:
 conversionType-- Returns:
 
 
- 
setConversionType
public void setConversionType(java.lang.String conversionType)
Set convertion type.- Parameters:
 conversionType-
 
- 
getDomanData
public java.util.List<com.edsdev.jconvert.domain.ConversionType> getDomanData()
Get domain data- Returns:
 
 
- 
getConversionType
public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType()
Get current convertion type.- Returns:
 - current conversion type.
 
 
 - 
 
 - 
 
DMelt 3.0 © DataMelt by jWork.ORG