Class Weight


  • public class Weight
    extends java.lang.Object
    An instance of this class represents a certain weight value. Different methods allow to retrieve it in various units.
    • Constructor Summary

      Constructors 
      Constructor Description
      Weight​(double weight_kg)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double get_kg()
      Return weight in kilograms.
      double get_lbs()
      Return weight in pounds.
      void set_lbs​(double weight_lbs)
      Set weight in pounds.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Weight

        public Weight​(double weight_kg)
        Constructor.
        Parameters:
        weight_kg - weight in kilograms
    • Method Detail

      • set_lbs

        public void set_lbs​(double weight_lbs)
        Set weight in pounds.
      • get_kg

        public double get_kg()
        Return weight in kilograms.
      • get_lbs

        public double get_lbs()
        Return weight in pounds.