Package com.xero.models.project
Enum ChargeType
- java.lang.Object
-
- java.lang.Enum<ChargeType>
-
- com.xero.models.project.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 Summary
Enum Constants Enum Constant Description FIXEDFIXEDNON_CHARGEABLENON_CHARGEABLETIMETIME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChargeTypefromValue(String value)fromValueStringgetValue()StringtoString()toStringstatic ChargeTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ChargeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TIME
public static final ChargeType TIME
TIME
-
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 nameNullPointerException- if the argument is null
-
getValue
public String getValue()
- Returns:
- String value
-
toString
public String toString()
toString- Overrides:
toStringin classEnum<ChargeType>- Returns:
- String value
-
fromValue
public static ChargeType fromValue(String value)
fromValue- Parameters:
value- String
-
-