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