1 package net.sourceforge.phpeclipse.xdebug.php.model;
3 import org.w3c.dom.Node;
5 public class XDebugBooleanValue extends XDebugAbstractValue {
7 public XDebugBooleanValue(XDebugVariable variable, Node varNode,
9 super(variable, varNode, typeName);
12 public boolean supportsValueModification() {
16 public void setType(String typeName) {
17 fType = XDebugAbstractValue.VALUETYPE_BOOLEAN;
21 public void renderValueString(String data) {
24 value = Integer.parseInt(data);
25 } catch (NumberFormatException e) {
26 data = data.toLowerCase();
27 if (data.equals("true") || data.equals("false"))
30 fValueString = "not defined";
33 fValueString = "false";
35 fValueString = "true";
37 fValueString = "not defined";
40 public boolean verifyValue(String expression) {
43 value = Integer.parseInt(expression);
44 } catch (NumberFormatException e) {
45 expression = expression.toLowerCase();
46 if (expression.equals("true") || expression.equals("false"))
51 if ((value >= 0) && (value <= 1))