Enum Class States
- All Implemented Interfaces:
Serializable,Comparable<States>,Constable
Enumeration of US State and Territory names and codes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionGets the enumerated state / territory by code.Gets the enumerated state / territory by name.getCode()Gets the state / territory code.getName()Gets the state / territory name.static StatesReturns the enum constant of this class with the specified name.static States[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALABAMA
-
ALASKA
-
AMERICAN_SAMOA
-
ARIZONA
-
ARKANSAS
-
ARMED_FORCES_AE
-
ARMED_FORCES_AMERICAS
-
ARMED_FORCES_PACIFIC
-
CALIFORNIA
-
COLORADO
-
CONNECTICUT
-
DELAWARE
-
DISTRICT_OF_COLUMBIA
-
FLORIDA
-
GEORGIA
-
GUAM
-
HAWAII
-
IDAHO
-
ILLINOIS
-
INDIANA
-
IOWA
-
KANSAS
-
KENTUCKY
-
LOUISIANA
-
MAINE
-
MARYLAND
-
MASSACHUSETTS
-
MICHIGAN
-
MINNESOTA
-
MISSISSIPPI
-
MISSOURI
-
MONTANA
-
NEBRASKA
-
NEVADA
-
NEW_HAMPSHIRE
-
NEW_JERSEY
-
NEW_MEXICO
-
NEW_YORK
-
NORTH_CAROLINA
-
NORTH_DAKOTA
-
OHIO
-
OKLAHOMA
-
OREGON
-
PENNSYLVANIA
-
PUERTO_RICO
-
RHODE_ISLAND
-
SOUTH_CAROLINA
-
SOUTH_DAKOTA
-
TENNESSEE
-
TEXAS
-
UTAH
-
VERMONT
-
VIRGINIA
-
WASHINGTON
-
WEST_VIRGINIA
-
WISCONSIN
-
WYOMING
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getByName
Gets the enumerated state / territory by name.- Parameters:
name- state / territory name- Returns:
- enumerated state
-
getByCode
Gets the enumerated state / territory by code.- Parameters:
code- state / territory code- Returns:
- enumerated state
-
getName
Gets the state / territory name.- Returns:
- state / territory name
-
getCode
Gets the state / territory code.- Returns:
- state / territory code
-