Package org.xwiki.diff
Interface Patch<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<E>
apply(List<E> target)
Apply the patch.List<E>
restore(List<E> target)
Invert the patch.-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
apply
List<E> apply(List<E> target) throws PatchException
Apply the patch.- Parameters:
target
- the list on which to apply the patch- Returns:
- the modified list
- Throws:
PatchException
- failed to apply the patch
-
restore
List<E> restore(List<E> target) throws PatchException
Invert the patch.- Parameters:
target
- the list on which to apply an inverted version of the patch- Returns:
- the modified list
- Throws:
PatchException
- failed to apply the patch
-
-