FileDocCategorySizeDatePackage
Name.javaAPI DocExample2246Thu Oct 13 14:57:26 BST 2005com.samscdrental.model.adt

Name

public class Name extends Object implements Serializable

Title: Sams CD Rental Store

Description:

Copyright: Copyright (c) 2004

Company:

author
Ken Pugh
version
1.0

Fields Summary
private static final long
serialVersionUID
private String
theValue
private static final String
INVALID_ID
private static final String
ERROR_NAME_BAD_CHARACTERS
Constructors Summary
public Name()

 

	 
	
	
public Name(String aString)
Name

param
aString String

		fromString( aString );

	
Methods Summary
public booleanequals(com.samscdrental.model.adt.Name aName)
Indicates whether some other object is "equal to" this one.

param
obj the reference object with which to compare.
return
true if this object is the same as the obj argument; false otherwise.
todo
Implement this java.lang.Object method

		return ( aName.theValue.equals( this.theValue ) );

	
public booleanequals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

param
obj the reference object with which to compare.
return
true if this object is the same as the obj argument; false otherwise.
todo
Implement this java.lang.Object method

		return equals( ( Name ) obj );
	
private voidfromString(java.lang.String aString)
fromString

param
aString String
return
boolean


		if ( !StringHelper.containsNoControls( aString ) )
		{
			throw new NameFormatDeviation(
				ERROR_NAME_BAD_CHARACTERS );
		}
		theValue = aString;
	
booleanisInvalid()

		return theValue.equals( INVALID_ID );
	
public static com.samscdrental.model.adt.NameparseString(java.lang.String aString)

		return new Name( aString );
	
public java.lang.StringtoString()

		return theValue;