Package org.xwiki.diff
Interface Delta<E>
-
- Type Parameters:
E- the type of compared elements
public interface Delta<E>A delta between two version of a list.- Version:
- $Id: 71863b4888c035be4d03fc95420ca02b0f66ed55 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDelta.TypeThe kind of modification to apply on the list.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidapply(List<E> target)Apply the delta on the provided list.default intgetMaxChunkSize()Chunk<E>getNext()Chunk<E>getPrevious()Delta.TypegetType()voidrestore(List<E> target)Apply the an inverted version of the delta on the provided list.voidverify(List<E> target)Try to apply the delta on the provided list.
-
-
-
Method Detail
-
verify
void verify(List<E> target) throws PatchException
Try to apply the delta on the provided list.- Parameters:
target- the list to modify- Throws:
PatchException- if the delta cannot be applied
-
apply
void apply(List<E> target) throws PatchException
Apply the delta on the provided list.- Parameters:
target- the list to modify- Throws:
PatchException- if the delta cannot be applied
-
restore
void restore(List<E> target) throws PatchException
Apply the an inverted version of the delta on the provided list.- Parameters:
target- the list to modify- Throws:
PatchException- if the delta cannot be applied
-
getType
Delta.Type getType()
- Returns:
- the type of modification applied to the list
-
getMaxChunkSize
default int getMaxChunkSize()
- Returns:
- the max size between the two chunks of the delta.
- Since:
- 11.8RC1
-
-