public final class Binary extends Object implements Scalar<Boolean>
There is no thread-safety guarantee.
This class implements Scalar
, which throws a checked
Exception
. This may not be convenient in many cases. To make
it more convenient and get rid of the checked exception you can
use the UncheckedScalar
decorator. Or you may use
IoCheckedScalar
to wrap it in an IOException.
final AtomicInteger counter = new AtomicInteger();
new Binary(
() -> true,
() -> counter.incrementAndGet
).value() // will be equal true
Copyright © 2017–2019 Cactoos. All rights reserved.