public final class UnsignedNumberUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
MAX_VALUE |
| Modifier and Type | Method and Description |
|---|---|
static int |
parseUnsignedInt(String s)
Returns the unsigned
int value represented by the given decimal string. |
static long |
parseUnsignedLong(String s)
Returns the unsigned
long value represented by the given decimal string. |
static String |
unsignedIntToString(int x)
Returns a string representation of x, where x is treated as unsigned.
|
static String |
unsignedLongToString(long x)
Returns a string representation of x, where x is treated as unsigned.
|
public static final long MAX_VALUE
public static int parseUnsignedInt(String s)
int value represented by the given decimal string.NumberFormatException - if the string does not contain a valid unsigned int valueNullPointerException - if s is null (in contrast to Integer.parseInt(String))public static String unsignedIntToString(int x)
public static long parseUnsignedLong(String s)
long value represented by the given decimal string.NumberFormatException - if the string does not contain a valid unsigned long
valueNullPointerException - if s is null
(in contrast to Long.parseLong(String))public static String unsignedLongToString(long x)
Copyright © 2009–2022. All rights reserved.