Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects
In directory sc8-pr-cvs1:/tmp/cvs-serv29954/src/core/com/mockobjects
Modified Files:
ReturnValue.java
Log Message:
Added int support to return value
Index: ReturnValue.java
===================================================================
RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/ReturnValue.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ReturnValue.java 2 Jan 2003 15:57:39 -0000 1.2
+++ ReturnValue.java 21 Feb 2003 14:08:26 -0000 1.3
@@ -72,7 +72,25 @@
setValue(new Boolean(value));
}
+ /**
+ * @return the current value converted to a boolean
+ */
public boolean getBooleanValue() {
return ((Boolean)getValue()).booleanValue();
}
-}
+
+ /**
+ * @return the current value converted to an int
+ */
+ public int getIntValue() {
+ return ((Integer)getValue()).intValue();
+ }
+
+ /**
+ * @param value value to be returned by getIntValue. Calling getValue after this method will return
+ * a Integer wrapper around the value.
+ */
+ public void setValue(int value) {
+ setValue(new Integer(value));
+ }
+}
\ No newline at end of file
|