Interface ChangeSwitch<R>

Type Parameters:
R - method return type

public interface ChangeSwitch<R>
Visitor pattern interface for the Change class hierarchy.
See Also:
  • Method Details

    • caseObjectCreate

      default <T> R caseObjectCreate(ObjectCreate<T> change)
      Handle an ObjectCreate event.

      The implementation in ChangeSwitch delegates to caseChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseObjectDelete

      default <T> R caseObjectDelete(ObjectDelete<T> change)
      Handle an ObjectDelete event.

      The implementation in ChangeSwitch delegates to caseChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseListFieldAdd

      default <T, E> R caseListFieldAdd(ListFieldAdd<T,E> change)
      Handle a ListFieldAdd event.

      The implementation in ChangeSwitch delegates to caseListFieldChange().

      Type Parameters:
      T - changed object type
      E - changed list element type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseListFieldClear

      default <T> R caseListFieldClear(ListFieldClear<T> change)
      Handle a ListFieldClear event.

      The implementation in ChangeSwitch delegates to caseListFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseListFieldRemove

      default <T, E> R caseListFieldRemove(ListFieldRemove<T,E> change)
      Handle a ListFieldRemove event.

      The implementation in ChangeSwitch delegates to caseListFieldChange().

      Type Parameters:
      T - changed object type
      E - changed list element type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseListFieldReplace

      default <T, E> R caseListFieldReplace(ListFieldReplace<T,E> change)
      Handle a ListFieldReplace event.

      The implementation in ChangeSwitch delegates to caseListFieldChange().

      Type Parameters:
      T - changed object type
      E - changed list element type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseMapFieldAdd

      default <T, K, V> R caseMapFieldAdd(MapFieldAdd<T,K,V> change)
      Handle a MapFieldAdd event.

      The implementation in ChangeSwitch delegates to caseMapFieldChange().

      Type Parameters:
      T - changed object type
      K - changed map key type
      V - changed map value type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseMapFieldClear

      default <T> R caseMapFieldClear(MapFieldClear<T> change)
      Handle a MapFieldClear event.

      The implementation in ChangeSwitch delegates to caseMapFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseMapFieldRemove

      default <T, K, V> R caseMapFieldRemove(MapFieldRemove<T,K,V> change)
      Handle a MapFieldRemove event.

      The implementation in ChangeSwitch delegates to caseMapFieldChange().

      Type Parameters:
      T - changed object type
      K - changed map key type
      V - changed map value type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseMapFieldReplace

      default <T, K, V> R caseMapFieldReplace(MapFieldReplace<T,K,V> change)
      Handle a MapFieldReplace event.

      The implementation in ChangeSwitch delegates to caseMapFieldChange().

      Type Parameters:
      T - changed object type
      K - changed map key type
      V - changed map value type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseSetFieldAdd

      default <T, E> R caseSetFieldAdd(SetFieldAdd<T,E> change)
      Handle a SetFieldAdd event.

      The implementation in ChangeSwitch delegates to caseSetFieldChange().

      Type Parameters:
      T - changed object type
      E - changed set element type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseSetFieldClear

      default <T> R caseSetFieldClear(SetFieldClear<T> change)
      Handle a SetFieldClear event.

      The implementation in ChangeSwitch delegates to caseSetFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseSetFieldRemove

      default <T, E> R caseSetFieldRemove(SetFieldRemove<T,E> change)
      Handle a SetFieldRemove event.

      The implementation in ChangeSwitch delegates to caseSetFieldChange().

      Type Parameters:
      T - changed object type
      E - changed set element type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseSimpleFieldChange

      default <T, V> R caseSimpleFieldChange(SimpleFieldChange<T,V> change)
      Handle a SimpleFieldChange event.

      The implementation in ChangeSwitch delegates to caseFieldChange().

      Type Parameters:
      T - changed object type
      V - changed encoding
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseListFieldChange

      default <T> R caseListFieldChange(ListFieldChange<T> change)
      Visitor pattern roll-up method.

      The implementation in ChangeSwitch delegates to caseFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseMapFieldChange

      default <T> R caseMapFieldChange(MapFieldChange<T> change)
      Visitor pattern roll-up method.

      The implementation in ChangeSwitch delegates to caseFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseSetFieldChange

      default <T> R caseSetFieldChange(SetFieldChange<T> change)
      Visitor pattern roll-up method.

      The implementation in ChangeSwitch delegates to caseFieldChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseFieldChange

      default <T> R caseFieldChange(FieldChange<T> change)
      Visitor pattern roll-up method.

      The implementation in ChangeSwitch delegates to caseChange().

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value
    • caseChange

      default <T> R caseChange(Change<T> change)
      Visitor pattern roll-up method.

      The implementation in ChangeSwitch returns null.

      Type Parameters:
      T - changed object type
      Parameters:
      change - visiting change
      Returns:
      visitor return value