com.sun.sgs.impl.util
Class Numbers
java.lang.Object
com.sun.sgs.impl.util.Numbers
public final class Numbers
- extends Object
Utility methods for working with numbers.
|
Method Summary |
static long |
addCheckOverflow(long x,
long y)
A utility method that adds two non-negative longs, returning
Long.MAX_VALUE if the value would overflow. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
addCheckOverflow
public static long addCheckOverflow(long x,
long y)
- A utility method that adds two non-negative
longs, returning
Long.MAX_VALUE if the value would overflow.
- Parameters:
x - first valuey - second value
- Returns:
- the sum
- Throws:
IllegalArgumentException - if either argument is negative
Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved