|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.IntegerUtil
public final class IntegerUtil
Utility class with some integer related helper methods.
| Field Summary | |
|---|---|
static String |
EMPTY
Empty String. |
static String |
PREFIX_BINARY
The prefix to identify binary values. |
static String |
PREFIX_HEXADECIMAL
The prefix to identify hexadecimal values. |
| Method Summary | |
|---|---|
static Integer |
parseIntFromBinOrHex(String value)
Tries to parse an Integer value out of the given string. |
static String |
toBinaryString(Integer value)
Converts a given integer value to binary and adds the binary prefix in front of it. |
static String |
toHexadecimalString(Integer value)
Converts a given integer value to hexadecimal and adds the binary prefix in front of it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PREFIX_BINARY
public static final String PREFIX_HEXADECIMAL
public static final String EMPTY
| Method Detail |
|---|
public static Integer parseIntFromBinOrHex(String value)
If string starts with 'b' it is parsed as binary.
If string starts with '0x' it is parsed as hexadecimal.
If string starts with number directly, it is parsed as decimal.
value - String value with or without leading format information
public static String toBinaryString(Integer value)
value - integer value
public static String toHexadecimalString(Integer value)
value - integer value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||