ch.uzh.ifi.attempto.chartparser
Class StringRef

java.lang.Object
  extended by ch.uzh.ifi.attempto.chartparser.StringRef

public class StringRef
extends java.lang.Object

This class represents a string object that can unify with other string objects.

Author:
Tobias Kuhn

Constructor Summary
StringRef()
          Creates a new string object with null as value.
StringRef(java.lang.String string)
          Creates a new string object with the given value.
 
Method Summary
 java.lang.String getString()
          Returns the value of this string object.
 void unify(StringRef stringObj)
          Unifies this string object with another string object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringRef

public StringRef()
Creates a new string object with null as value.


StringRef

public StringRef(java.lang.String string)
Creates a new string object with the given value.

Parameters:
string - The value of the new string object.
Method Detail

unify

public void unify(StringRef stringObj)
           throws UnificationFailedException
Unifies this string object with another string object. If unification is not possible, an exception is thrown.

Parameters:
stringObj - The string object to be unified with this string object.
Throws:
UnificationFailedException - If unification fails.

getString

public java.lang.String getString()
Returns the value of this string object.

Returns:
The value of this string object.


Copyright 2008-2009, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)