Interface UnitParser


public interface UnitParser
UnitParser.java.

Copyright (c) 2023-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.

Author:
Peter Knoppers
  • Method Summary

    Modifier and Type
    Method
    Description
    org.djunits.value.vdouble.scalar.base.DoubleScalar<?,?>
    parseUnit(double value, String unit)
    Parse a user-specific unit.
  • Method Details

    • parseUnit

      org.djunits.value.vdouble.scalar.base.DoubleScalar<?,?> parseUnit(double value, String unit)
      Parse a user-specific unit.
      Parameters:
      value - double; the value (already parsed; expressed in the unit)
      unit - String; the unit specification
      Returns:
      DoubleScalar<?,?>; the resulting (strongly typed) value, or null if the user-specified parser cannot handle the provided unit