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 reference to a string object that can unify with other string objects. Uninstantiated values are represented by the null value. Such uninstantiated string objects can unify with other string objects (instantiated or uninstantiated ones).

Author:
Tobias Kuhn

Constructor Summary
StringRef()
          Creates a reference to a new string object with null as value.
StringRef(java.lang.String string)
          Creates a reference to a new string object with the given value.
 
Method Summary
 int getID()
          Returns the identifier of the string object.
 java.lang.String getString()
          Returns the value of the string object of this reference.
 void unify(StringRef stringRef)
          Unifies the string object of this reference with the string object of another reference.
 
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 reference to a new string object with null as value.


StringRef

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

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

unify

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

Parameters:
stringRef - The reference to the string object to be unified with the string object of this object.
Throws:
UnificationFailedException - If unification fails.

getString

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

Returns:
The value of the string object.

getID

public int getID()
Returns the identifier of the string object.

Returns:
The identifier.


Copyright 2008-2012, AceWiki developers