Determines whether the value assigned to the method is a valid number for the class's enumerated values.
public static boolean valid( int value )
value
The number being evaluated.
Returns true if the value is valid; otherwise, returns false.
The valid method determines whether a specific integer value is within the range of numbers for the enumerated members of this class. Use this method to determine whether a value returned from a method is a valid enumerated value of this class.