Package com.luna.common.mutable
Class MutableBool
java.lang.Object
com.luna.common.mutable.MutableBool
- All Implemented Interfaces:
Mutable<Boolean>
,Serializable
,Comparable<MutableBool>
public class MutableBool
extends Object
implements Comparable<MutableBool>, Mutable<Boolean>, Serializable
可变
boolean
类型- Since:
- 3.0.1
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MutableBool
public MutableBool()构造,默认值0 -
MutableBool
public MutableBool(boolean value) 构造- Parameters:
value
- 值
-
MutableBool
构造- Parameters:
value
- String值- Throws:
NumberFormatException
- 转为Boolean错误
-
-
Method Details
-
get
Description copied from interface:Mutable
获得原始值 -
set
public void set(boolean value) 设置值- Parameters:
value
- 值
-
set
Description copied from interface:Mutable
设置值 -
equals
相等需同时满足如下条件:- 非空
- 类型为
MutableBool
- 值相等
-
hashCode
public int hashCode() -
compareTo
比较- Specified by:
compareTo
in interfaceComparable<MutableBool>
- Parameters:
other
- 其它MutableBool
对象- Returns:
- x==y返回0,x<y返回-1,x>y返回1
-
toString
-