io.permazen.change.ChangeSwitch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of permazen-main Show documentation
Show all versions of permazen-main Show documentation
Permazen classes that map Java model classes onto the core API.
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package io.permazen.change;
/**
* Visitor pattern interface for the {@link Change} class hierarchy.
*
* @param method return type
* @see Change#visit
*/
public interface ChangeSwitch {
/**
* Handle an {@link ObjectCreate} event.
*
* @param change visiting change
* @param changed object type
* @return visitor return value
*/
R caseObjectCreate(ObjectCreate change);
/**
* Handle an {@link ObjectDelete} event.
*
* @param change visiting change
* @param changed object type
* @return visitor return value
*/
R caseObjectDelete(ObjectDelete change);
/**
* Handle a {@link ListFieldAdd} event.
*
* @param change visiting change
* @param changed object type
* @param changed list element type
* @return visitor return value
*/
R caseListFieldAdd(ListFieldAdd change);
/**
* Handle a {@link ListFieldClear} event.
*
* @param change visiting change
* @param changed object type
* @return visitor return value
*/
R caseListFieldClear(ListFieldClear change);
/**
* Handle a {@link ListFieldRemove} event.
*
* @param change visiting change
* @param changed object type
* @param changed list element type
* @return visitor return value
*/
R caseListFieldRemove(ListFieldRemove change);
/**
* Handle a {@link ListFieldReplace} event.
*
* @param change visiting change
* @param changed object type
* @param changed list element type
* @return visitor return value
*/
R caseListFieldReplace(ListFieldReplace change);
/**
* Handle a {@link MapFieldAdd} event.
*
* @param change visiting change
* @param changed object type
* @param changed map key type
* @param changed map value type
* @return visitor return value
*/
R caseMapFieldAdd(MapFieldAdd change);
/**
* Handle a {@link MapFieldClear} event.
*
* @param change visiting change
* @param changed object type
* @return visitor return value
*/
R caseMapFieldClear(MapFieldClear change);
/**
* Handle a {@link MapFieldRemove} event.
*
* @param change visiting change
* @param changed object type
* @param changed map key type
* @param changed map value type
* @return visitor return value
*/
R caseMapFieldRemove(MapFieldRemove change);
/**
* Handle a {@link MapFieldReplace} event.
*
* @param change visiting change
* @param changed object type
* @param changed map key type
* @param changed map value type
* @return visitor return value
*/
R caseMapFieldReplace(MapFieldReplace change);
/**
* Handle a {@link SetFieldAdd} event.
*
* @param change visiting change
* @param changed object type
* @param changed set element type
* @return visitor return value
*/
R caseSetFieldAdd(SetFieldAdd change);
/**
* Handle a {@link SetFieldClear} event.
*
* @param change visiting change
* @param changed object type
* @return visitor return value
*/
R caseSetFieldClear(SetFieldClear change);
/**
* Handle a {@link SetFieldRemove} event.
*
* @param change visiting change
* @param changed object type
* @param changed set element type
* @return visitor return value
*/
R caseSetFieldRemove(SetFieldRemove change);
/**
* Handle a {@link SimpleFieldChange} event.
*
* @param change visiting change
* @param changed object type
* @param changed field type
* @return visitor return value
*/
R caseSimpleFieldChange(SimpleFieldChange change);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy