public class MutableShort extends Number implements Comparable<MutableShort>, Mutable<Number>
short 类型Short,
Serialized Form| Constructor and Description |
|---|
MutableShort()
构造,默认值0
|
MutableShort(Number value)
构造
|
MutableShort(short value)
构造
|
MutableShort(String value)
构造
|
| Modifier and Type | Method and Description |
|---|---|
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 in class Numberpublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic boolean equals(Object obj)
MutableShortpublic int compareTo(MutableShort other)
compareTo in interface Comparable<MutableShort>other - 其它 MutableShort 对象Copyright © 2025. All rights reserved.