EDU.utwente.CoCompose.util
Class UniqueString

java.lang.Object
  extended byEDU.utwente.CoCompose.util.UniqueString
Direct Known Subclasses:
Identifier

public class UniqueString
extends java.lang.Object

A string that is guaranteed unique or throws an exception.

Version:
0.0.23, 20 June 2002
Author:
Dennis Wagelaar

Constructor Summary
UniqueString(UniqueRealm realm)
          Constructs a UniqueString.
UniqueString(UniqueRealm realm, java.lang.String value)
          Constructs a UniqueString.
 
Method Summary
 java.lang.String getValue()
          Gets the string value.
 void setValue(java.lang.String value)
          Sets the string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniqueString

public UniqueString(UniqueRealm realm)
             throws CoComposeException
Constructs a UniqueString.

Parameters:
realm - The realm in which the value has to be unique.
Throws:
CoComposeException - if the new UniqueString ("") is not unique.

UniqueString

public UniqueString(UniqueRealm realm,
                    java.lang.String value)
             throws CoComposeException
Constructs a UniqueString.

Parameters:
realm - The realm in which the value has to be unique.
value - The value to set this string to.
Throws:
CoComposeException - if the new UniqueString is not unique.
Method Detail

getValue

public java.lang.String getValue()
Gets the string value.

Returns:
The string value.

setValue

public void setValue(java.lang.String value)
              throws CoComposeException
Sets the string value.

Parameters:
value - The new string value.
Throws:
CoComposeException - if the new value is not unique.