Class BooleanHolder


  • public final class BooleanHolder
    extends java.lang.Object
    A mutable holder class to represent a boolean value. BooleanHolder objects are useful as out and inout parameters.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean value
      The boolean value held by this object.
    • Constructor Summary

      Constructors 
      Constructor Description
      BooleanHolder()
      Instantiates an BooleanHolder object with the initial value false.
      BooleanHolder​(boolean value)
      Instantiates an BooleanHolder object with the initial value given.
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        public boolean value
        The boolean value held by this object.
    • Constructor Detail

      • BooleanHolder

        public BooleanHolder()
        Instantiates an BooleanHolder object with the initial value false.
      • BooleanHolder

        public BooleanHolder​(boolean value)
        Instantiates an BooleanHolder object with the initial value given.
        Parameters:
        value - the initial value.