Class Distance

    • Constructor Detail

      • Distance

        public Distance​(double amount,
                        DistanceUnit unit)
        Creates a new distance.
        Parameters:
        amount - the amount of the distance. Must be a non-negative non-infinity number.
        unit - the distance unit. Must not be null.
        Since:
        9.0.0
    • Method Detail

      • getAmount

        public double getAmount()
        Returns the amount.
        Returns:
        the amount
        Since:
        9.0.0
      • getUnit

        public DistanceUnit getUnit()
        Returns the unit.
        Returns:
        the unit
        Since:
        9.0.0