Enum ChargeType

  • All Implemented Interfaces:
    Serializable, Comparable<ChargeType>

    public enum ChargeType
    extends Enum<ChargeType>
    Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`.
    • Enum Constant Detail

      • FIXED

        public static final ChargeType FIXED
        FIXED
      • NON_CHARGEABLE

        public static final ChargeType NON_CHARGEABLE
        NON_CHARGEABLE
    • Method Detail

      • values

        public static ChargeType[] 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 (ChargeType c : ChargeType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ChargeType 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
      • getValue

        public String getValue()
        Returns:
        String value
      • fromValue

        public static ChargeType fromValue​(String value)
        fromValue
        Parameters:
        value - String