ubiware.util.saplbuilder
Class Variable

java.lang.Object
  extended by ubiware.util.saplbuilder.Variable
All Implemented Interfaces:
Object, Predicate, Subject

public class Variable
extends java.lang.Object
implements Subject, Predicate, Object

Representation of a variable. A variable can be used as a Subject, Predicate and Object.

Since:
7 May 2011
Author:
Michael Cochez for Ubiware project

Constructor Summary
Variable(java.lang.String variableName)
          Create a variable.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 void generateSapl(java.lang.StringBuilder builder)
          Generate the s-apl representation for this subject.
 int hashCode()
           
 java.lang.String toString()
          Gives a String representation of this variable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable(java.lang.String variableName)
Create a variable. Only the name of the variable must be specified. Thus, do not include the '?' sign as first character. Variable must start with an ASCII letter or '_' and contain only ASCII letters, '_' and numbers

Parameters:
variableName -
Method Detail

generateSapl

public void generateSapl(java.lang.StringBuilder builder)
Description copied from interface: Subject
Generate the s-apl representation for this subject.

Specified by:
generateSapl in interface Object
Specified by:
generateSapl in interface Predicate
Specified by:
generateSapl in interface Subject
Parameters:
builder - The StringBuilder on which the representation must be appended.

toString

public java.lang.String toString()
Gives a String representation of this variable.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object