public enum GuavaLongMath extends Enum<GuavaLongMath>
| Modifier and Type | Method and Description |
|---|---|
static long |
saturatedAdd(long a,
long b)
Returns the sum of
a and b unless it would overflow or underflow in which case
Long.MAX_VALUE or Long.MIN_VALUE is returned, respectively. |
static GuavaLongMath |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GuavaLongMath[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static GuavaLongMath[] values()
for (GuavaLongMath c : GuavaLongMath.values()) System.out.println(c);
public static GuavaLongMath valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static long saturatedAdd(long a,
long b)
a and b unless it would overflow or underflow in which case
Long.MAX_VALUE or Long.MIN_VALUE is returned, respectively.Copyright © 2019. All rights reserved.