public class MutableByte extends Number implements Comparable<MutableByte>, Mutable<Number>
byte 类型Byte,
Serialized Form| Constructor and Description |
|---|
MutableByte()
构造,默认值0
|
MutableByte(byte value)
构造
|
MutableByte(Number value)
构造
|
MutableByte(String value)
构造
|
| Modifier and Type | Method and Description |
|---|---|
MutableByte |
add(byte operand)
增加值
|
MutableByte |
add(Number operand)
增加值
|
byte |
byteValue() |
int |
compareTo(MutableByte other)
比较
|
MutableByte |
decrement()
值减一
|
double |
doubleValue() |
boolean |
equals(Object obj)
相等需同时满足如下条件:
非空
类型为 MutableByte
值相等
|
float |
floatValue() |
Byte |
get()
获得原始值
|
int |
hashCode() |
MutableByte |
increment()
值+1
|
int |
intValue() |
long |
longValue() |
void |
set(byte value)
设置值
|
void |
set(Number value)
设置值
|
MutableByte |
subtract(byte operand)
减去值
|
MutableByte |
subtract(Number operand)
减去值
|
String |
toString() |
shortValuepublic MutableByte()
public MutableByte(byte value)
value - 值public MutableByte(Number value)
value - 值public MutableByte(String value) throws NumberFormatException
value - String值NumberFormatException - 转为Byte错误public void set(byte value)
value - 值public MutableByte increment()
public MutableByte decrement()
public MutableByte add(byte operand)
operand - 被增加的值public MutableByte add(Number operand)
operand - 被增加的值,非空NullPointerException - if the object is nullpublic MutableByte subtract(byte operand)
operand - 被减的值public MutableByte subtract(Number operand)
operand - 被减的值,非空NullPointerException - if the object is nullpublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic boolean equals(Object obj)
public int compareTo(MutableByte other)
compareTo in interface Comparable<MutableByte>other - 其它 MutableByte 对象Copyright © 2025. All rights reserved.