Documentation of 'jhplot.UCalc' Java class.

Class UCalc

  • public class UCalcextends Object
    Calculations using different measurement and physics unit systems.
    • Constructor Detail

      • UCalc

        public UCalc()
        Initialaze calculations with units.
    • Method Detail

      • eval

        public String eval(String havestr,                   String wantstr)
        Performs the computation with units.
        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.
        answer as a string. If "error", then there was an error
      • getValue

        public double getValue()
        Returns answer as double.
        anser as double value
      • getUnit

        public String getUnit()
        Returns expected unit.
        expected unit.
      • showSource

        public void showSource()
        Show source.
      • showConformable

        public void showConformable()
        Shows units, functions, and aliases conformable to given Value. (Originally part of 'tryallunits'.)
      • search

        public void search()
        Shows units and functions with names containing the current unit. (Originally part of 'tryallunits'.)
      • search

        public void search(String name)
        Shows units and functions with names containing a given substring. (Originally part of 'tryallunits'.)
        name - the name of the unit.
      • showDef

        public String showDef(String name)
        If the argument is the name of a function or unit list, returns its definition. Otherwise returns null.
        name - the name.
        definition or null.
      • help

        public void help()
        Show help topics in a window.

DMelt 2.7 © DataMelt by jWork.ORG