Package org.agrona.collections
Class MutableBoolean
- java.lang.Object
-
- org.agrona.collections.MutableBoolean
-
public class MutableBoolean extends java.lang.Object
Mutable boolean valid that is useful for capturing a value when using lambdas or collections.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
value
For convenient access.
-
Constructor Summary
Constructors Constructor Description MutableBoolean()
Default constructor.MutableBoolean(boolean value)
Construct with a default value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
boolean
get()
Get the current value.int
hashCode()
void
set(boolean value)
Set the current value.java.lang.String
toString()
-
-
-
Method Detail
-
get
public boolean get()
Get the current value.- Returns:
- the current value.
-
set
public void set(boolean value)
Set the current value.- Parameters:
value
- to be set.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-