Class 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()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        public boolean value
        For convenient access.
    • Constructor Detail

      • MutableBoolean

        public MutableBoolean()
        Default constructor.
      • MutableBoolean

        public MutableBoolean​(boolean value)
        Construct with a default value.
        Parameters:
        value - to be set initially.
    • 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 class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object