org.opengts.db
Class USState

java.lang.Object
  extended by org.opengts.db.USState

public class USState
extends java.lang.Object


Constructor Summary
USState()
           
 
Method Summary
static java.lang.String getStateAbbreviation(java.lang.String code, java.lang.String dft)
          Gets the state abbreviation for the specified state code
static java.lang.String getStateCode(java.lang.String name, java.lang.String dft)
          Gets the state code for the specified state name
static java.lang.String getStateName(java.lang.String code)
          Gets the state name for the specified state code
static boolean isStateCode(java.lang.String code)
          Returns true if the specified state code is defined
static void main(java.lang.String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USState

public USState()
Method Detail

isStateCode

public static boolean isStateCode(java.lang.String code)
Returns true if the specified state code is defined

Parameters:
code - The state code
Returns:
True if teh specified state is defined, false otherwise

getStateName

public static java.lang.String getStateName(java.lang.String code)
Gets the state name for the specified state code

Parameters:
code - The state code
Returns:
The state name, or an empty String if the state code was not found

getStateCode

public static java.lang.String getStateCode(java.lang.String name,
                                            java.lang.String dft)
Gets the state code for the specified state name

Parameters:
name - The state name
dft - The default name to return if the specified state name is not found
Returns:
The state code

getStateAbbreviation

public static java.lang.String getStateAbbreviation(java.lang.String code,
                                                    java.lang.String dft)
Gets the state abbreviation for the specified state code

Parameters:
code - The state code
dft - The default abbreviation to return if the specified code was not found
Returns:
The state abbreviation

main

public static void main(java.lang.String[] argv)