public class MutableShort extends Number implements Comparable<MutableShort>, Mutable<Number>
short 类型| 构造器和说明 |
|---|
MutableShort()
构造,默认值0
|
MutableShort(Number value)
构造
|
MutableShort(short value)
构造
|
MutableShort(String value)
构造
|
| 限定符和类型 | 方法和说明 |
|---|---|
MutableShort |
add(Number operand)
增加值
|
MutableShort |
add(short operand)
增加值
|
int |
compareTo(MutableShort other)
比较
|
MutableShort |
decrement()
值减一
|
double |
doubleValue() |
boolean |
equals(Object obj)
相等需同时满足如下条件:
非空
类型为
MutableShort
值相等
|
float |
floatValue() |
Short |
get()
获得原始值
|
int |
hashCode() |
MutableShort |
increment()
值+1
|
int |
intValue() |
long |
longValue() |
void |
set(Number value)
设置值
|
void |
set(short value)
设置值
|
short |
shortValue() |
MutableShort |
subtract(Number operand)
减去值
|
MutableShort |
subtract(short operand)
减去值
|
String |
toString() |
public MutableShort()
public MutableShort(short value)
value - 值public MutableShort(Number value)
value - 值public MutableShort(String value) throws NumberFormatException
value - String值NumberFormatException - 转为Short错误public void set(short value)
value - 值public MutableShort increment()
public MutableShort decrement()
public MutableShort add(short operand)
operand - 被增加的值public MutableShort add(Number operand)
operand - 被增加的值,非空NullPointerException - if the object is nullpublic MutableShort subtract(short operand)
operand - 被减的值public MutableShort subtract(Number operand)
operand - 被减的值,非空NullPointerException - if the object is nullpublic short shortValue()
shortValue 在类中 Numberpublic float floatValue()
floatValue 在类中 Numberpublic double doubleValue()
doubleValue 在类中 Numberpublic boolean equals(Object obj)
MutableShortpublic int compareTo(MutableShort other)
compareTo 在接口中 Comparable<MutableShort>other - 其它 MutableShort 对象Copyright © 2022. All rights reserved.