Beispiel #1
0
 /**
  * Apply this patch to the given target
  *
  * @return the patched text
  * @throws PatchFailedException if can't apply patch
  */
 public List<T> applyTo(final List<T> target) throws PatchFailedException {
   final List<T> result = new LinkedList<T>(target);
   final ListIterator<Delta<T>> it = getDeltas().listIterator(deltaSize);
   while (it.hasPrevious()) {
     final Delta<T> delta = it.previous();
     delta.applyTo(result);
   }
   return result;
 }