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