/** * Applies the series of deltas in this revision as patches to the given text. * * @param src * the text to patch, which the method doesn't change. * @return the resulting text after the patches have been applied. * @throws PatchFailedException * if any of the patches cannot be applied. */ public Object[] patch(Object[] src) throws PatchFailedException { List<Object> target = new ArrayList<Object>(Arrays.asList(src)); applyTo(target); return target.toArray(); }
/** * Applies the series of deltas in this revision as patches to the given text. * * @param src * the text to patch, which the method doesn't change. * @return the resulting text after the patches have been applied. * @throws PatchFailedException * if any of the patches cannot be applied. */ public Object[] patch(final Object[] src) throws PatchFailedException { List<Object> target = new ArrayList<>(Arrays.asList(src)); applyTo(target); return target.toArray(); }
/** * Applies the series of deltas in this revision as patches to the given text. * * @param src * the text to patch, which the method doesn't change. * @return the resulting text after the patches have been applied. * @throws PatchFailedException * if any of the patches cannot be applied. */ public Object[] patch(Object[] src) throws PatchFailedException { List target = new ArrayList(Arrays.asList(src)); applyTo(target); return target.toArray(); }