Package com.sgs.common.database
Enum Commodity.ExpiryMethod
- java.lang.Object
-
- java.lang.Enum<Commodity.ExpiryMethod>
-
- com.sgs.common.database.Commodity.ExpiryMethod
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Commodity.ExpiryMethod>
- Enclosing class:
- Commodity
public static enum Commodity.ExpiryMethod extends java.lang.Enum<Commodity.ExpiryMethod>
The style by which expiry can be calculated. Standard follows the defaultExpiryDays and relevant terminal settings Manufacture date will add the default expiry days onto the manufacture date rather than the current date the manufacture date is the date derived from the expiry mask. Expiration date will take the value from the mask and treat that as the expiry date Custom defines a methodology of derriving the expiry date from a non-standard barcode- Author:
- SGSystems
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOM
EXPIRATIONDATE
MANUFACTUREDATE
STANDARD
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getInt()
static Commodity.ExpiryMethod[]
getValues()
static Commodity.ExpiryMethod
parse(int type)
static Commodity.ExpiryMethod
parse(java.lang.String type)
java.lang.String
toString()
static Commodity.ExpiryMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Commodity.ExpiryMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STANDARD
public static final Commodity.ExpiryMethod STANDARD
-
MANUFACTUREDATE
public static final Commodity.ExpiryMethod MANUFACTUREDATE
-
EXPIRATIONDATE
public static final Commodity.ExpiryMethod EXPIRATIONDATE
-
CUSTOM
public static final Commodity.ExpiryMethod CUSTOM
-
-
Method Detail
-
values
public static Commodity.ExpiryMethod[] 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 (Commodity.ExpiryMethod c : Commodity.ExpiryMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Commodity.ExpiryMethod valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
parse
public static Commodity.ExpiryMethod parse(int type)
-
parse
public static Commodity.ExpiryMethod parse(java.lang.String type)
-
getValues
public static Commodity.ExpiryMethod[] getValues()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Commodity.ExpiryMethod>
-
getInt
public int getInt()
-
-