com.billpringle.utils.wrputils
Class WrpState

java.lang.Object
  extended by com.billpringle.utils.wrputils.WrpState

public class WrpState
extends java.lang.Object

This class can be used to determine if a string is a valid USPS state abbreviation. Validation can be done using a static routine:

WrpState.isState(abbr);
Creative Commons License Creative Commons License Symbols Unless noted otherwise, all materials available for download from my site are copyrighted by Bill Pringle, and are licensed under a Creative Commons License.

Author:
Bill Pringle

Field Summary
(package private) static long serialVersionUID
          serial version UID
static java.lang.String[] states
          List of US State abbreviations from USPS web site.
 
Constructor Summary
WrpState()
          Default constructor Since validation routine is static, this routine isn't really needed
 
Method Summary
static java.lang.Boolean isState(java.lang.String abbr)
          Routine to validate state abbreviation.
static void main(java.lang.String[] args)
          Test driver for class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
serial version UID

See Also:
Constant Field Values

states

public static final java.lang.String[] states
List of US State abbreviations from USPS web site.

Constructor Detail

WrpState

public WrpState()
Default constructor Since validation routine is static, this routine isn't really needed

Method Detail

isState

public static java.lang.Boolean isState(java.lang.String abbr)
Routine to validate state abbreviation.

Parameters:
abbr - abbreviation to check
Returns:
True if valid abbreviation

main

public static void main(java.lang.String[] args)
Test driver for class

Parameters:
args - not used