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