View Javadoc

1   package org.catacomb.interlish.content;
2   
3   
4   public class IntegerValue extends PrimitiveValue {
5   
6   
7       private int intval;
8   
9   
10      public IntegerValue() {
11          super();
12          intval = 0;
13      }
14  
15      public IntegerValue(int i) {
16          super();
17          intval = i;
18      }
19  
20  
21      public String toString() {
22          return "" + intval;
23      }
24  
25      public void silentSetInteger(int i) {
26          intval = i;
27          logChange();
28      }
29  
30      public int getInteger() {
31          return intval;
32      }
33  
34  
35      public void reportableSetInteger(int i, Object src) {
36          silentSetInteger(i);
37          reportValueChange(src);
38      }
39  
40      public void copyFrom(IntegerValue src) {
41          silentSetInteger(src.getInteger());
42  
43      }
44  
45  
46  
47  }