From: Jeff M. <cus...@us...> - 2003-03-18 14:28:21
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects In directory sc8-pr-cvs1:/tmp/cvs-serv22766/src/core/com/mockobjects Modified Files: ReturnValue.java Log Message: Added Long support to ReturnValue Index: ReturnValue.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/ReturnValue.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ReturnValue.java 21 Feb 2003 14:08:26 -0000 1.3 +++ ReturnValue.java 18 Mar 2003 14:28:17 -0000 1.4 @@ -83,7 +83,7 @@ * @return the current value converted to an int */ public int getIntValue() { - return ((Integer)getValue()).intValue(); + return ((Number)getValue()).intValue(); } /** @@ -93,4 +93,21 @@ public void setValue(int value) { setValue(new Integer(value)); } + + /** + * @param value value to be returned by getLongValue. Calling getValue after this method will return + * a Long wrapper around the value. + */ + public void setValue(long value) { + setValue(new Long(value)); + } + + /** + * @return the current value converted to an long + */ + public long getLongValue() { + return ((Number)getValue()).longValue(); + } + + } |