Class UnitFragment

java.lang.Object
org.kigalisim.lang.fragment.Fragment
org.kigalisim.lang.fragment.UnitFragment

public class UnitFragment extends Fragment
A fragment containing only a unit string.
  • Constructor Details

    • UnitFragment

      public UnitFragment(String unit)
      Create a new UnitFragment.
      Parameters:
      unit - The unit string parsed from the source of this fragment.
  • Method Details

    • getUnit

      public String getUnit()
      Description copied from class: Fragment
      Get the units that should be applied to the result of a calculation or to an EngineNumber.
      Overrides:
      getUnit in class Fragment
      Returns:
      Parsed units as a string.