jhplot
Class UConverter
- java.lang.Object
- jhplot.UConverter
public class UConverterextends Object
Class to convert various units of measure.
Constructor Summary
Constructors Constructor and Description UConverter()
Initialise convertionsUConverter(String type)
Initialise conversion if you know the type
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double
convert(double value, String fromUnit, String toUnit)
Perform convertion of values fomr one unit to another.com.edsdev.jconvert.domain.ConversionType
findType(String conversionUnit)
Find and set conversion type.com.edsdev.jconvert.presentation.ConversionTypeData
getConversionType()
Get current convertion type.com.edsdev.jconvert.presentation.ConversionTypeData
getConversionType(String conversionType)
Get convertion typeList<com.edsdev.jconvert.domain.ConversionType>
getDomanData()
Get domain dataString[]
getTypes()
Get all conversion types as stringsvoid
setConversionType(String conversionType)
Set convertion type.String
toString()
Show as a string all conversion types
Constructor Detail
UConverter
public UConverter()
Initialise convertions
UConverter
public UConverter(String type)
Initialise conversion if you know the type- Parameters:
type
- unit type.
Method Detail
convert
public double convert(double value, String fromUnit, 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 String toString()
Show as a string all conversion types
getTypes
public String[] getTypes()
Get all conversion types as strings- Returns:
- array with conversion styles.
findType
public com.edsdev.jconvert.domain.ConversionType findType(String conversionUnit)
Find and set conversion type.- Parameters:
conversionUnit
- convertion unit- Returns:
- conversion type
getConversionType
public com.edsdev.jconvert.presentation.ConversionTypeData getConversionType(String conversionType)
Get convertion type- Parameters:
conversionType
-- Returns:
setConversionType
public void setConversionType(String conversionType)
Set convertion type.- Parameters:
conversionType
-
getDomanData
public 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 2.7 © DataMelt by jWork.ORG