Interface ValueUpdater<T,U>

Type Parameters:
T - the type of object
U - the type of value used to update the object
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractUpdater, CompositeUpdater, PofUpdater, ReflectionUpdater, UniversalUpdater
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ValueUpdater<T,U> extends Serializable
ValueUpdater is used to update an object's state.
Since:
Coherence 3.1
Author:
jh/gg 2005.10.25
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    update(T target, U value)
    Update the state of the passed target object using the passed value.
  • Method Details

    • update

      void update(T target, U value)
      Update the state of the passed target object using the passed value. For intrinsic types, the specified value is expected to be a standard wrapper type in the same manner that reflection works; for example, an int value would be passed as a java.lang.Integer.
      Parameters:
      target - the Object to update the state of
      value - the new value to update the state with
      Throws:
      ClassCastException - if this ValueUpdater is incompatible with the passed target object or the value and the implementation requires the passed object or the value to be of a certain type
      WrapperException - if this ValueUpdater encounters a checked exception in the course of updating the target object
      IllegalArgumentException - if this ValueUpdater cannot handle the passed target object or value for any other reason; an implementor should include a descriptive message