public class UCalc extends Object
| Constructor and Description |
|---|
UCalc()
Initialaze calculations with units.
|
| Modifier and Type | Method and Description |
|---|---|
String |
eval(String havestr,
String wantstr)
Performs the computation with units.
|
String |
getUnit()
Returns expected unit.
|
double |
getValue()
Returns answer as double.
|
void |
help()
Show help topics in a window.
|
void |
search()
Shows units and functions with names containing the current unit.
|
void |
search(String name)
Shows units and functions with names containing a given substring.
|
void |
showConformable()
Shows units, functions, and aliases conformable to given Value.
|
String |
showDef(String name)
If the argument is the name of a function or unit list,
returns its definition.
|
void |
showSource()
Show source.
|
public String eval(String havestr, String wantstr)
havestr - expression specifying the value to be converted.toString - string specifying unit of the desired result:
expression, function name, unit list name, or unit list.public double getValue()
public String getUnit()
public void showSource()
public void showConformable()
public void search()
public void search(String name)
name - the name of the unit.public String showDef(String name)
name - the name.public void help()
DMelt 2.0 © DataMelt by jWork.ORG