T
- generic type@FunctionalInterface
public interface BooleanSetter<T>
Especially useful for handling setting properties which have a boolean value.
class A
{
private boolean value;
public boolean getValue()
{
return value;
}
public void setValue(boolean value)
{
this.value = value;
}
}
// [...]
BooleanSetter<A> valueSetter = A::setValue;
The other way round, i.e. a BooleanGetter
, is already provided
by standard library interface Predicate
.Modifier and Type | Method and Description |
---|---|
void |
set(T item,
boolean value)
Handle an item and a boolean value.
|