Package org.aoju.bus.core.lang.mutable
Class MutableByte
java.lang.Object
java.lang.Number
org.aoju.bus.core.lang.mutable.MutableByte
- All Implemented Interfaces:
Serializable,Comparable<MutableByte>,Mutable<Number>
可变
byte 类型- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
ConstructorsConstructorDescription构造,默认值0MutableByte(byte value) 构造MutableByte(Number value) 构造MutableByte(String value) 构造 -
Method Summary
Modifier and TypeMethodDescriptionadd(byte operand) 增加值增加值byteintcompareTo(MutableByte other) 比较值减一doubleboolean相等需同时满足如下条件: 非空 类型为MutableByte值相等floatget()获得原始值inthashCode()值+1intintValue()longvoidset(byte value) 设置值void设置值subtract(byte operand) 减去值减去值toString()Methods inherited from class java.lang.Number
shortValue
-
Constructor Details
-
MutableByte
public MutableByte()构造,默认值0 -
MutableByte
public MutableByte(byte value) 构造- Parameters:
value- 值
-
MutableByte
-
MutableByte
构造- Parameters:
value- String值- Throws:
NumberFormatException- 转为Byte错误
-
-
Method Details
-
get
-
set
public void set(byte value) 设置值- Parameters:
value- 值
-
set
-
increment
-
decrement
-
add
-
add
增加值- Parameters:
operand- 被增加的值,非空- Returns:
- this
- Throws:
NullPointerException- if the object is null
-
subtract
-
subtract
减去值- Parameters:
operand- 被减的值,非空- Returns:
- this
- Throws:
NullPointerException- if the object is null
-
byteValue
-
intValue
-
longValue
-
floatValue
public float floatValue()- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()- Specified by:
doubleValuein classNumber
-
equals
相等需同时满足如下条件:- 非空
- 类型为
MutableByte - 值相等
-
hashCode
-
compareTo
比较- Specified by:
compareToin interfaceComparable<MutableByte>- Parameters:
other- 其它MutableByte对象- Returns:
- x==y返回0,x<y返回-1,x>y返回1
-
toString
-