jp.sf.orangesignal.ta.util
クラス NumberUtils
java.lang.Object
jp.sf.orangesignal.ta.util.NumberUtils
public abstract class NumberUtils
- extends Object
数値変換に関するユーティリティクラスを提供します。
- 導入されたバージョン:
- 2.2
- 作成者:
- 杉澤 浩二
メソッドの概要 |
static int |
toInt(String str)
指定された文字列を整数へ変換して返します。 |
static int |
toInt(String str,
int defaultValue)
指定された文字列を整数へ変換して返します。 |
クラス java.lang.Object から継承されたメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberUtils
public NumberUtils()
toInt
public static int toInt(String str)
- 指定された文字列を整数へ変換して返します。
指定された文字列が整数でない場合は、
0 を返します。
- パラメータ:
str
- 文字列
- 戻り値:
- 変換された整数。または
0
toInt
public static int toInt(String str,
int defaultValue)
- 指定された文字列を整数へ変換して返します。
指定された文字列が整数でない場合は、指定された既定値を返します。
- パラメータ:
str
- 文字列defaultValue
- 既定値
- 戻り値:
- 変換された整数。または既定値
Copyright © 2006-2009 OrangeSignal.com. All Rights Reserved.