|
||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||
java.lang.Objectjp.hishidama.util.NumberUtil
public class NumberUtil
| コンストラクタの概要 | |
|---|---|
NumberUtil()
|
|
| メソッドの概要 | |
|---|---|
static long |
parseLong(String str)
数値変換. |
static long |
parseLongBin(String str)
二進数変換. |
static long |
parseLongBin(String str,
int pos,
int len)
二進数変換. |
static long |
parseLongDec(String str)
十進数変換. |
static long |
parseLongDec(String str,
int pos,
int len)
十進数変換. |
static long |
parseLongHex(String str)
十六進数変換. |
static long |
parseLongHex(String str,
int pos,
int len)
十六進数変換. |
static long |
parseLongOct(String str)
八進数変換. |
static long |
parseLongOct(String str,
int pos,
int len)
八進数変換. |
| クラス java.lang.Object から継承されたメソッド |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public NumberUtil()
| メソッドの詳細 |
|---|
public static long parseLong(String str)
接頭辞付きの数値文字列をlongに変換する。
| 0b | 二進数 |
| 0o | 八進数 |
| 0x | 十六進数 |
| その他 | 十進数 |
接尾辞は、単純に無視する。
| l | . |
str - 文字列(接頭辞付き)
NumberFormatExceptionpublic static long parseLongBin(String str)
文字列を二進数としてlongに変換する。
str - 文字列
NumberFormatException
public static long parseLongBin(String str,
int pos,
int len)
文字列を二進数としてlongに変換する。
str - 文字列pos - 位置len - 長さ
NumberFormatExceptionpublic static long parseLongOct(String str)
文字列を八進数としてlongに変換する。
str - 文字列
NumberFormatException
public static long parseLongOct(String str,
int pos,
int len)
文字列を八進数としてlongに変換する。
str - 文字列pos - 位置len - 長さ
NumberFormatExceptionpublic static long parseLongDec(String str)
文字列を十進数としてlongに変換する。
str - 文字列
NumberFormatException
public static long parseLongDec(String str,
int pos,
int len)
文字列を十進数としてlongに変換する。
str - 文字列pos - 位置len - 長さ
NumberFormatExceptionpublic static long parseLongHex(String str)
文字列を十六進数としてlongに変換する。
str - 文字列
NumberFormatException
public static long parseLongHex(String str,
int pos,
int len)
文字列を十六進数としてlongに変換する。
str - 文字列pos - 位置len - 長さ
NumberFormatException
|
||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||