com.croftsoft.core.util.id
Class StringId

java.lang.Object
  extended by com.croftsoft.core.util.id.StringId
All Implemented Interfaces:
Id, Serializable, Cloneable

public class StringId
extends Object
implements Id

An Id implementation backed by a String.

Since:
2000-01-16
Version:
$Id: StringId.java,v 1.3 2008/09/20 05:11:34 croft Exp $
See Also:
Serialized Form
Author:
David Wallace Croft

Constructor Summary
StringId(String s)
          Main constructor.
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 String getS()
           
 int hashCode()
           
 String toString()
          return s;
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringId

public StringId(String s)
Main constructor.

Throws:
NullArgumentException - If argument is null.
Method Detail

getS

public String getS()

equals

public boolean equals(Object other)
Specified by:
equals in interface Id
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Id
Overrides:
hashCode in class Object

clone

public Object clone()
Specified by:
clone in interface Id
Overrides:
clone in class Object

toString

public String toString()
return s;

Overrides:
toString in class Object

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)