00001 /* 00002 * Created on Nov 2, 2009 00003 * 00004 * TODO To change the template for this generated file go to 00005 * Window - Preferences - Java - Code Style - Code Templates 00006 */ 00007 package edu.tum.cs.srl; 00008 00009 import edu.tum.cs.util.StringTool; 00010 00011 public abstract class AbstractVariable { 00015 public String functionName; 00019 public String[] params; 00020 public String value; 00021 00022 public AbstractVariable(String functionName, String[] params, String value) { 00023 this.functionName = functionName; 00024 this.params = params; 00025 this.value = value; 00026 } 00027 00028 public String toString() { 00029 return getKeyString() + " = " + value; 00030 } 00031 00032 public String getKeyString() { 00033 return functionName + "(" + StringTool.join(",", params) + ")"; 00034 } 00035 00040 public abstract String getPredicate(); 00041 00042 public abstract boolean isBoolean(); 00043 00044 public boolean isTrue() { 00045 return value.equalsIgnoreCase("True"); 00046 } 00047 }