com.restfully.shop.services
Enum CarResource.Color
java.lang.Object
java.lang.Enum<CarResource.Color>
com.restfully.shop.services.CarResource.Color
- All Implemented Interfaces:
- Serializable, Comparable<CarResource.Color>
- Enclosing class:
- CarResource
public static enum CarResource.Color
- extends Enum<CarResource.Color>
red
public static final CarResource.Color red
white
public static final CarResource.Color white
blue
public static final CarResource.Color blue
black
public static final CarResource.Color black
values
public static CarResource.Color[] 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 (CarResource.Color c : CarResource.Color.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static CarResource.Color 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
Copyright © 2013 Oracle Corporation. All Rights Reserved.