9002c3e417997d4ed332284345f6ceedb7da771d
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.core / src / net / sourceforge / phpeclipse / xdebug / php / model / XDebugIntValue.java
1 package net.sourceforge.phpeclipse.xdebug.php.model;
2
3 import org.w3c.dom.Node;
4
5 public class XDebugIntValue extends XDebugAbstractValue {
6
7         public XDebugIntValue(XDebugVariable variable, Node varNode, String TypeName) {
8                 super(variable, varNode, TypeName);
9
10         }
11
12         public void setType(String typeName) {
13                 fType = XDebugAbstractValue.VALUETYPE_INT;
14                 fTypeName = typeName;
15         }
16
17         public boolean supportsValueModification() {
18                 return true;
19         }
20
21         public void renderValueString(String dataString) {
22                 fValueString = dataString;
23         }
24
25         public boolean verifyValue(String expression) {
26                 try {
27                         Integer.parseInt(expression);
28                 } catch (NumberFormatException e) {
29                         return false;
30                 }
31                 return true;
32         }
33
34         public String toString() {
35                 return fValueString;
36         }
37
38 }