Enum ProductType
- java.lang.Object
-
- java.lang.Enum<ProductType>
-
- cz.cvut.fel.sit.omo.foodchain.product.ProductType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ProductType>,java.lang.constant.Constable
public enum ProductType extends java.lang.Enum<ProductType>
Enum class for product types
-
-
Constructor Summary
Constructors Modifier Constructor Description privateProductType()
-
Method Summary
Modifier and Type Method Description static ProductTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ProductType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MEAT
public static final ProductType MEAT
-
FRUIT
public static final ProductType FRUIT
-
VEGETABLE
public static final ProductType VEGETABLE
-
OTHER
public static final ProductType OTHER
-
ALL
public static final ProductType ALL
-
-
Method Detail
-
values
public static ProductType[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProductType 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
-
-