public static MutableBoolean fromExternal(final BooleanSupplier s, final Consumer<Boolean> c) {
        return new MutableBoolean() {
            @Override
            public boolean getAsBoolean() {
                return s.getAsBoolean();
            }

            @Override
            public Boolean get() {
                return getAsBoolean();
            }

            @Override
            public MutableBoolean set(final boolean value) {
                c.accept(value);
                return this;
            }
        };
    }
public static MutableBoolean fromExternal ( final BooleanSupplier s , final Consumer < Boolean > c ) { return new MutableBoolean ( ) { @ Override public boolean getAsBoolean ( ) { return s . getAsBoolean ( ) ; } @ Override public Boolean get ( ) { return getAsBoolean ( ) ; } @ Override public MutableBoolean set ( final boolean value ) { c . accept ( value ) ; return this ; } } ; }
Construct a MutableBoolean that gets and sets an external value using the provided Supplier and Consumer

e.g.
<pre>
{@code
MutableBoolean mutable = MutableBoolean.fromExternal(()->!this.value,val->!this.value);
}
</pre>


@param s Supplier of an external value
@param c Consumer that sets an external value
@return MutableBoolean that gets / sets an external (mutable) value