Enum SpeedUnit

    • Enum Constant Detail

      • MILLIMETERS_PER_SECOND

        public static final SpeedUnit MILLIMETERS_PER_SECOND
        millimeters/second.
      • METERS_PER_SECOND

        public static final SpeedUnit METERS_PER_SECOND
        meters/second.
      • KILOMETERS_PER_HOUR

        public static final SpeedUnit KILOMETERS_PER_HOUR
        kilometer/hour.
    • Method Detail

      • values

        public static SpeedUnit[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SpeedUnit c : SpeedUnit.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SpeedUnit valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • toTimeUnit

        @Pure
        public TimeUnit toTimeUnit()
        Replies the time unit that corresponds to this speed unit.
        Returns:
        the time unit.
      • toSpaceUnit

        @Pure
        public SpaceUnit toSpaceUnit()
        Replies the space unit that corresponds to this speed unit.
        Returns:
        the space unit.
      • lower

        @Pure
        public SpeedUnit lower()
        Replies the speed unit just lower than the current speed unit, or the speed unit itself if it is the smallest.
        Returns:
        the speed unit just lower than the current speed unit, or the speed unit itself if it is the smallest.
      • upper

        @Pure
        public SpeedUnit upper()
        Replies the speed unit just upper than the current speed unit, or the speed unit itself if it is the uppest.
        Returns:
        the speed unit just upper than the current speed unit, or the speed unit itself if it is the uppest.
      • getSymbol

        @Pure
        public String getSymbol()
        Replies the localized symbol for this space unit.
        Returns:
        the localized symbol for this space unit.