jp.hishidama.util
クラス NumberUtil

java.lang.Object
  上位を拡張 jp.hishidama.util.NumberUtil

public class NumberUtil
extends Object


コンストラクタの概要
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
 

コンストラクタの詳細

NumberUtil

public NumberUtil()
メソッドの詳細

parseLong

public static long parseLong(String str)
数値変換.

接頭辞付きの数値文字列をlongに変換する。

接頭辞
0b 二進数
0o 八進数
0x 十六進数
その他 十進数

接尾辞は、単純に無視する。

接尾辞
l .

パラメータ:
str - 文字列(接頭辞付き)
戻り値:
数値
例外:
NumberFormatException

parseLongBin

public static long parseLongBin(String str)
二進数変換.

文字列を二進数としてlongに変換する。

パラメータ:
str - 文字列
戻り値:
数値
例外:
NumberFormatException

parseLongBin

public static long parseLongBin(String str,
                                int pos,
                                int len)
二進数変換.

文字列を二進数としてlongに変換する。

パラメータ:
str - 文字列
pos - 位置
len - 長さ
戻り値:
数値
例外:
NumberFormatException

parseLongOct

public static long parseLongOct(String str)
八進数変換.

文字列を八進数としてlongに変換する。

パラメータ:
str - 文字列
戻り値:
数値
例外:
NumberFormatException

parseLongOct

public static long parseLongOct(String str,
                                int pos,
                                int len)
八進数変換.

文字列を八進数としてlongに変換する。

パラメータ:
str - 文字列
pos - 位置
len - 長さ
戻り値:
数値
例外:
NumberFormatException

parseLongDec

public static long parseLongDec(String str)
十進数変換.

文字列を十進数としてlongに変換する。

パラメータ:
str - 文字列
戻り値:
数値
例外:
NumberFormatException

parseLongDec

public static long parseLongDec(String str,
                                int pos,
                                int len)
十進数変換.

文字列を十進数としてlongに変換する。

パラメータ:
str - 文字列
pos - 位置
len - 長さ
戻り値:
数値
例外:
NumberFormatException

parseLongHex

public static long parseLongHex(String str)
十六進数変換.

文字列を十六進数としてlongに変換する。

パラメータ:
str - 文字列
戻り値:
数値
例外:
NumberFormatException

parseLongHex

public static long parseLongHex(String str,
                                int pos,
                                int len)
十六進数変換.

文字列を十六進数としてlongに変換する。

パラメータ:
str - 文字列
pos - 位置
len - 長さ
戻り値:
数値
例外:
NumberFormatException