前パッケージ クラス階層 このパッケージ 前項目 次項目 インデックス
java.lang.Object
   |
   +----java.lang.Number
           |
           +----java.lang.Integer
int 型の値をラップします。 Integer 型オブジェクトは int 型のフィールドを一つだけ含みます。
 
 これに加えて、このクラスは int を取り扱うのに便利なメソッドや定数を含み、その他に、 intからStringへの変換と、String からintへの変換を行うメソッドを幾つか備えています。
 
 MAX_VALUE
	MAX_VALUE
  int型のとりえる最大値。
   MIN_VALUE
	MIN_VALUE
  int型のとりえる最小値。
   TYPE
	TYPE
   
 Integer(int)
	Integer(int)
  int 型引数を表す Integer オブジェクトを新規にメモリを割り当てて構築する。
   Integer(String)
	Integer(String)
  Integer オブジェクトを新規にメモリを割り当てて構築する。
 
 byteValue()
	byteValue()
   decode(String)
	decode(String)
   doubleValue()
	doubleValue()
   equals(Object)
	equals(Object)
   floatValue()
	floatValue()
   getInteger(String)
	getInteger(String)
   getInteger(String, int)
	getInteger(String, int)
   getInteger(String, Integer)
	getInteger(String, Integer)
   hashCode()
	hashCode()
   intValue()
	intValue()
   longValue()
	longValue()
   parseInt(String)
	parseInt(String)
   parseInt(String, int)
	parseInt(String, int)
   shortValue()
	shortValue()
   toBinaryString(int)
	toBinaryString(int)
   toHexString(int)
	toHexString(int)
   toOctalString(int)
	toOctalString(int)
   toString()
	toString()
   toString(int)
	toString(int)
   toString(int, int)
	toString(int, int)
   valueOf(String)
	valueOf(String)
   valueOf(String, int)
	valueOf(String, int)
   
 MIN_VALUE
MIN_VALUE
public static final int MIN_VALUE
int型がとりえる最小値です。
 MAX_VALUE
MAX_VALUE
public static final int MAX_VALUE
int 型がとりえる範囲の最大値です。
 TYPE
TYPE
public static final Class TYPE
 
 Integer
Integer
public Integer(int value)
int 型引数を表現する Integer オブジェクトを構築します。
Integer として表現する値。
   Integer
Integer
public Integer(String s) throws NumberFormatException
Integer オブジェクトを構築します。文字列は valueOf メソッドと同じ方法で int 値に変換されます。
Integer へ変換される String 。
    String が整数へ解析できない場合。
     
 toString
toString
public static String toString(int i,int radix)
 もし、基数が Character.MIN_RADIX より小さいか、または Character.MAX_RADIX よりも大きい場合は、基数を 10 として処理します。
 
 もし第1引数が負であった場合には、得られる結果の先頭要素は ASCII のマイナス文字 '-' になります。第1引数が非負の値を表現するものであれば結果の先頭に符号文字は現れません。数字の各桁には次の ASCII文字が使われます。
 
0123456789abcdefghijklmnopqrstuvwxyz
 toHexString
toHexString
public static String toHexString(int i)
 もし、負の引数を与えた場合には、得られる符号無し整数は引数 + 232 になります。負でない引数の場合は引数そのものになります。この値は 16 進数のASCII文字列(基数 16)となり先頭に余分の 0 は付加されません。
 toOctalString
toOctalString
public static String toOctalString(int i)
 もし、負の引数を与えた場合には、得られる符号無し整数は引数 + 232 になります。負でない引数の場合は引数そのものになります。この値は 8 進数形式のASCII文字列(基数 8)となり先頭に余分の 0 は付加されません。
 toBinaryString
toBinaryString
public static String toBinaryString(int i)
  もし、負の引数を与えた場合には、得られる符号無し整数は引数 + 232 になります。負でない引数の場合は引数そのものになります。この値はバイナリ形式のASCII文字列(基数 2)となり先頭に余分の 0 は付加されません。
 toString
toString
public static String toString(int i)
 parseInt
parseInt
 public static int parseInt(String s,
                            int radix) throws NumberFormatException
Character.digitを実行したときに負でない値を返すもの)でなければなりません。負の引数を表すときに先頭文字が ASCIIのマイナス符号 '-' になることのみが例外です。処理の結果、整数値が返されます。
String 。
     parseInt
parseInt
public static int parseInt(String s) throws NumberFormatException
'-'になる以外は、全て 10 進数でなければなりません。
 valueOf
valueOf
 public static Integer valueOf(String s,
                               int radix) throws NumberFormatException
Integer。
    String が解析できる整数値を含まない場合。
   valueOf
valueOf
public static Integer valueOf(String s) throws NumberFormatException
Integer。
     byteValue
byteValue
public byte byteValue()
 shortValue
shortValue
public short shortValue()
 intValue
intValue
public int intValue()
int 値。
     longValue
longValue
public long longValue()
int 値を long 型に変換し、その結果を返す。
    floatValue
floatValue
public float floatValue()
int 値を float 型に変換し、その結果を返す。
     doubleValue
doubleValue
public double doubleValue()
int 値を double 型に変換し、その結果を返す。
     toString
toString
public String toString()
 hashCode
hashCode
public int hashCode()
 equals
equals
public boolean equals(Object obj)
nullではなく、このオブジェクトと同一のint値を持つInteger オブジェクトであるときのみtrueを返します。
true、それ以外は false。
     getInteger
getInteger
public static Integer getInteger(String nm)
 第1引数はシステムプロパティの名前として扱われます。 
 システムプロパティは getProperty か、または System クラスで定義されるメソッドを使ってアクセスすることができます。このプロパティが持つ文字列値は整数値と解釈され、この値を表現する Integer オブジェクトが返されます。可能な数値形式の詳細は getProperty の定義から知ることができます。 
 
 指定された名前を持つプロパティが存在しないか、またはプロパティが正しい数値形式を持たない場合は null が返されます。
Integer 値。
     getInteger
getInteger
public static Integer getInteger(String nm,int val)
 第1引数はシステムプロパティの名前として扱われます。 
 システムプロパティは getProperty か、または System クラスで定義されるメソッドを使ってアクセスすることができます。このプロパティが持つ文字列値は整数値と解釈され、この値を表現する Integer オブジェクトが返されます。可能な数値形式の詳細は getProperty の定義から知ることができます。 
 
 指定された名前を持つプロパティが存在しないか、またはプロパティが正しい数値形式を持たない場合は、第2引数の値を表現する  Integer オブジェクトが返されます。
 
Integer 値。
     getInteger
getInteger
public static Integer getInteger(String nm, Integer val)
  第1引数はシステムプロパティの名前として扱われます。 
 システムプロパティは getProperty か、または System クラスで定義されるメソッドを使ってアクセスすることができます。このプロパティが持つ文字列値は整数値と解釈され、この値を表現する Integer オブジェクトが返されます
 
 もしプロパティ値が "0x" か "#"で始まり、それに続くマイナス符号がなければ、このプロパティ値は16進数の整数として、基数 16 のInteger.valueOfメソッドと同じ方法で解析されます。
 
 もしプロパティ値が "0" で始まる場合は、このプロパティ値は 8 進数の整数として基数 8 のときのInteger.valueOfメソッドと同じ方法で解析されます。
 
 これ以外の場合には、プロパティ値は 10 進数の整数として、基数 10 のときの Integer.valueOfメソッドと同じ方法で解析されます。
 
第2引数はデフォルト値であり、指定した名前のプロパティが存在しないか、またはプロパティ値が正しい形式を持たない場合にこの第2引数が返されます。
Integer 値。
     decode
decode
public static Integer decode(String nm) throws NumberFormatException
前パッケージ クラス階層 このパッケージ 前項目 次項目 インデックス