콘텐츠로 이동

Class Short

package java.lang

java.lang.Object
|
+--java.lang.Short

extends Object:

Short 클래스는 short 값의 표준 래퍼입니다.

Since:

  • JDK1.1, CLDC 1.0
  • static short MAX_VALUE — Short가 가질 수 있는 최대값
  • static short MIN_VALUE — Short가 가질 수 있는 최소값
  • Short (short value) 지정된 short 값으로 초기화되는 Short 객체를 구성합니다.
  • boolean equals ( Object obj) — 이 객체를 지정된 객체와 비교합니다.
  • int hashCode () — 이 Short의 해시 코드를 반환합니다.
  • static short parseShort ( String s) — 지정된 문자열이 한 short를 나타내는 경우 해당 short의 값을 반환합니다.
  • static short parseShort ( String s, int radix) — 지정된 문자열이 short를 나타내는 경우 두 번째 인자로 지정된 기수의 해당 short 값을 반환합니다.
  • short shortValue () — 이 Short 값을 short로 반환합니다.
  • String toString () — 이 Short의 값을 나타내는 문자열 객체를 반환합니다.
public static final short MIN_VALUE

See Also:

  • Constant Field Values
public static final short MAX_VALUE

See Also:

  • Constant Field Values
public Short(short value)
  • 지정된 short 값으로 초기화되는 Short 객체를 구성합니다.

Parameters:

  • value - Short의 초기 값
public static short parseShort(String s)
throws NumberFormatException

Parameters:

  • s - 해당 short를 포함하는 문자열

Returns:

  • 지정된 문자열이 나타내는 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public static short parseShort(String s,
int radix)
throws NumberFormatException

Parameters:

  • radix - 사용되는 기수

Returns:

  • 지정된 문자가 나타내는 지정된 기수의 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public short shortValue()

Returns:

  • 이 Short 값(short)
public String toString()

Overrides:

  • toString in class Object

Returns:

  • 객체의 문자열 표현
public int hashCode()

Overrides:

  • hashCode in class Object

Returns:

  • 이 객체의 해시 코드 값

See Also:

  • Object.equals(java.lang.Object), Hashtable
public boolean equals(Object obj)

Overrides:

  • equals in class Object

Parameters:

  • obj - 비교할 객체

Returns:

  • 두 객체가 동일하면 true, 다르면 false

See Also:

  • Boolean.hashCode(), Hashtable
public Short(short value)
  • 지정된 short 값으로 초기화되는 Short 객체를 구성합니다.

Parameters:

  • value - Short의 초기 값
public static short parseShort(String s)
throws NumberFormatException

Parameters:

  • s - 해당 short를 포함하는 문자열

Returns:

  • 지정된 문자열이 나타내는 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public static short parseShort(String s,
int radix)
throws NumberFormatException

Parameters:

  • radix - 사용되는 기수

Returns:

  • 지정된 문자가 나타내는 지정된 기수의 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public short shortValue()

Returns:

  • 이 Short 값(short)
public String toString()

Overrides:

  • toString in class Object

Returns:

  • 객체의 문자열 표현
public int hashCode()

Overrides:

  • hashCode in class Object

Returns:

  • 이 객체의 해시 코드 값

See Also:

  • Object.equals(java.lang.Object), Hashtable
public boolean equals(Object obj)

Overrides:

  • equals in class Object

Parameters:

  • obj - 비교할 객체

Returns:

  • 두 객체가 동일하면 true, 다르면 false

See Also:

  • Boolean.hashCode(), Hashtable
public static short parseShort(String s)
throws NumberFormatException

Parameters:

  • s - 해당 short를 포함하는 문자열

Returns:

  • 지정된 문자열이 나타내는 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public static short parseShort(String s,
int radix)
throws NumberFormatException

Parameters:

  • radix - 사용되는 기수

Returns:

  • 지정된 문자가 나타내는 지정된 기수의 short 값

Throws:

  • NumberFormatException - 문자열에 구문 분석 가능한 short가 없는 경우
public short shortValue()

Returns:

  • 이 Short 값(short)
public String toString()

Overrides:

  • toString in class Object

Returns:

  • 객체의 문자열 표현
public int hashCode()

Overrides:

  • hashCode in class Object

Returns:

  • 이 객체의 해시 코드 값

See Also:

  • Object.equals(java.lang.Object), Hashtable
public boolean equals(Object obj)

Overrides:

  • equals in class Object

Parameters:

  • obj - 비교할 객체

Returns:

  • 두 객체가 동일하면 true, 다르면 false

See Also:

  • Boolean.hashCode(), Hashtable