FileDocCategorySizeDatePackage
Country5.javaAPI DocExample2941Sun Dec 14 22:47:30 GMT 2003oreilly.hcj.constants

Country5

public class Country5 extends Object implements Serializable
Holds country constants.
author
Robert Simmons jr. (kraythe)
version
$Revision: 1.3 $

Fields Summary
private static final Map
INDEX
Holds the Index of the country objects.
public static final Country5
CANADA
Contry constant for Canada.
public static final Country5
CROATIA
Contry constant for Croatia.
public static final Country5
GERMANY
Contry constant for Germany.
public static final Country5
ITALY
Contry constant for Italy.
public static final Country5
MEXICO
Contry constant for Mexico.
public static final Country5
UK
Contry constant for the UK.
public static final Country5
USA
Contry constant for the USA.
public static final Country5
VENEZUELA
Contry constant for the Venezuela.
private final String
name
Holds the name of this country.
Constructors Summary
private Country5(String name)
Creates a new Country5.

param
name The name for the exception type.


	             	 
	    
		this.name = name;
		INDEX.put(name, this);
	
Methods Summary
public java.lang.StringgetName()
Get the name of this country.

return
The name of the country.

		return this.name;
	
public static oreilly.hcj.constants.Country5lookup(java.lang.String name)
Looks up a String to find the associated Country3 object.

param
name The name to lookup.
return
The object or null if it does not exist.

		return (Country5)INDEX.get(name);
	
protected java.lang.ObjectreadResolve()
Resolve a read in object.

return
The resolved object read in.
throws
ObjectStreamException if there is a problem reading the object.
throws
RuntimeException If the read object doesnt exist.

		Object result = Country5.lookup(this.getName());
		if (result == null) {
			throw new RuntimeException("Constant not found for name: " + this.getName());
		}
		return result;