Plexus v0.13.1

com.phoenixst.collections
Class Identifier

java.lang.Object
  extended by com.phoenixst.collections.Identifier
All Implemented Interfaces:
Serializable

public class Identifier
extends Object
implements Serializable

Basically, this is just an Object with a toString() value set by the constructor. Instances of this class can be used instead of Strings for map and registry keys. The reason for doing so is that this class uses reference equality for .equals() semantics, so that multiple users can use the same registry without fear of duplicating someone else's key. Instances can also simply be used where it's helpful to have human readable toString() values for otherwise non-functional objects when Strings can't be used for some reason.

Since:
1.0
Version:
$Revision: 1.5 $
Author:
Ray A. Conner
See Also:
Serialized Form

Constructor Summary
Identifier(String name)
          Creates a new Identifier with the specified toString() value.
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Identifier

public Identifier(String name)
Creates a new Identifier with the specified toString() value.

Method Detail

toString

public String toString()
Overrides:
toString in class Object

Plexus v0.13.1

See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.