Package org.djutils.base
Class MutableBoolean
java.lang.Object
org.djutils.base.MutableBoolean
A simple version of a mutable boolean with get() and set(boolean) functions.
Copyright (c) 2023-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
- Author:
- Alexander Verbraeck
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MutableBoolean
public MutableBoolean(boolean value) Initialize the mutable boolean with a value.- Parameters:
value
- boolean; the initial value of the mutable boolean
-
-
Method Details
-
set
public void set(boolean newValue) set the mutable boolean to a new value.- Parameters:
newValue
- boolean; the new value of the mutable boolean
-
get
public boolean get()- Returns:
- boolean; the current value of the mutable boolean
-
flip
public void flip()Flip the value of modifiable boolean. -
hashCode
public int hashCode() -
equals
-
toString
-