Tabnine Logo
DiffMatchPatch.patchMake
Code IndexAdd Tabnine to your IDE (free)

How to use
patchMake
method
in
org.jboss.aerogear.sync.diffmatchpatch.DiffMatchPatch

Best Java code snippets using org.jboss.aerogear.sync.diffmatchpatch.DiffMatchPatch.patchMake (Showing top 4 results out of 315)

origin: org.jboss.aerogear/sync-diffmatchpatch-core

/**
 * Compute a list of patches to turn text1 into text2.
 * text2 is ignored, diffs are the delta between text2 and text2.
 *
 * @param text1 Old text
 * @param text2 Ignored.
 * @param diffs Array of Diff objects for text1 to text2.
 * @return LinkedList of Patch objects.
 * @deprecated Prefer {@link #patchMake(java.lang.String, java.util.LinkedList) }.
 */
public LinkedList<Patch> patchMake(String text1, String text2, LinkedList<Diff> diffs) {
  return patchMake(text1, diffs);
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

/**
 * Compute a list of patches to turn text1 into text2.
 * text1 will be derived from the provided diffs.
 *
 * @param diffs Array of Diff objects for text1 to text2.
 * @return LinkedList of Patch objects.
 */
public LinkedList<Patch> patchMake(LinkedList<Diff> diffs) {
  if (diffs == null) {
    throw new IllegalArgumentException("Null inputs. (patchMake)");
  }
  // No origin string provided, compute our own.
  String text1 = diffText1(diffs);
  return patchMake(text1, diffs);
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

/**
 * Compute a list of patches to turn text1 into text2.
 * A set of diffs will be computed.
 *
 * @param text1 Old text.
 * @param text2 New text.
 * @return LinkedList of Patch objects.
 */
public LinkedList<Patch> patchMake(String text1, String text2) {
  if (text1 == null || text2 == null) {
    throw new IllegalArgumentException("Null inputs. (patchMake)");
  }
  // No diffs provided, compute our own.
  LinkedList<Diff> diffs = diffMain(text1, text2, true);
  if (diffs.size() > 2) {
    diff_cleanupSemantic(diffs);
    diffCleanupEfficiency(diffs);
  }
  return patchMake(text1, diffs);
}
origin: org.jboss.aerogear/sync-diffmatchpatch-server

private LinkedList<Patch> patchesFrom(final DiffMatchPatchEdit edit) {
  return diffMatchPatch.patchMake(asDiffUtilDiffs(edit.diff().diffs()));
}
org.jboss.aerogear.sync.diffmatchpatchDiffMatchPatchpatchMake

Javadoc

Compute a list of patches to turn text1 into text2. A set of diffs will be computed.

Popular methods of DiffMatchPatch

  • diffMain
    Find the differences between two texts. Simplifies the problem by stripping any common prefix or suf
  • <init>
  • builder
  • checksum
  • diff
  • diffBisect
    Find the 'middle snake' of a diff, split the problem in two and return the recursively constructed d
  • diffBisectSplit
    Given the location of the 'middle snake', split the diff in two parts and recurse.
  • diffCharsToLines
    Rehydrate the text in a diff from a string of line hashes to real lines of text.
  • diffCleanupEfficiency
    Reduce the number of edits by eliminating operationally trivial equalities.
  • diffCleanupMerge
    Reorder and merge like edit sections. Merge equalities. Any edit section can move as long as it does
  • diffCleanupSemanticLossLess
    Look for single edits surrounded on both sides by equalities which can be shifted sideways to align
  • diffCleanupSemanticScore
    Given two strings, compute a score representing whether the internal boundary falls on logical bound
  • diffCleanupSemanticLossLess,
  • diffCleanupSemanticScore,
  • diffCommonOverlap,
  • diffCommonPrefix,
  • diffCommonSuffix,
  • diffCompute,
  • diffHalfMatch,
  • diffLevenshtein,
  • diffLineMode

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JFrame (javax.swing)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now