Variable { public boolean isString() { return (_type == STRING_TYPE); } protected  Variable(int type, Object value); static Variable createString(String value); static Variable createInteger(Integer value); static Variable createFloat(Float value); static Variable createBoolean(Boolean value); static Variable createTable(List<Variable> value); boolean isString(); boolean isInteger(); boolean isFloat(); boolean isBoolean(); boolean isTable(); String getString(); List<Variable> getTable(); Integer getInteger(); float getFloat(); boolean getBoolean(); String get_type(); String get_value();  }
@Test public void testIsString() { Variable v1 = Variable.createString("aValue"); assertTrue(v1.isString()); Variable v2 = Variable.createInteger(32); assertFalse(v2.isString()); }