congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DiffMatchPatchDiffs
Code IndexAdd Tabnine to your IDE (free)

How to use
DiffMatchPatchDiffs
in
org.jboss.aerogear.sync.diffmatchpatch

Best Java code snippets using org.jboss.aerogear.sync.diffmatchpatch.DiffMatchPatchDiffs (Showing top 6 results out of 315)

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

private DiffMatchPatchEdit(final Builder builder) {
  clientVersion = builder.clientVersion;
  serverVersion = builder.serverVersion;
  checksum = Arguments.checkNotNull(builder.checksum, "checksum must not be null");
  diffs = new DiffMatchPatchDiffs(builder.diffs);
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

@Override
public boolean equals(final Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  final DiffMatchPatchEdit that = (DiffMatchPatchEdit) o;
  if (clientVersion != that.clientVersion) {
    return false;
  }
  if (serverVersion != that.serverVersion) {
    return false;
  }
  if (!diffs.equals(that.diffs)) {
    return false;
  }
  return checksum.equals(that.checksum);
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

@Override
public int hashCode() {
  int result = checksum.hashCode();
  result = 31 * result + (int) (clientVersion ^ clientVersion >>> 32);
  result = 31 * result + (int) (serverVersion ^ serverVersion >>> 32);
  result = 31 * result + diffs.hashCode();
  return result;
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

  @Override
  public void serialize(final DiffMatchPatchEdit edit,
             final JsonGenerator jgen,
             final SerializerProvider provider) throws IOException {
    jgen.writeStartObject();
    jgen.writeStringField("msgType", "patch");
    jgen.writeNumberField("clientVersion", edit.clientVersion());
    jgen.writeNumberField("serverVersion", edit.serverVersion());
    jgen.writeStringField("checksum", edit.checksum());
    jgen.writeArrayFieldStart("diffs");
    if (edit.diff() != null) {
      for (DiffMatchPatchDiff diff : edit.diff().diffs()) {
        jgen.writeStartObject();
        jgen.writeStringField("operation", diff.operation().toString());
        jgen.writeStringField("text", diff.text());
        jgen.writeEndObject();
      }
    }
    jgen.writeEndArray();
  }
}
origin: org.jboss.aerogear/sync-diffmatchpatch-server

private LinkedList<Patch> patchesFrom(final DiffMatchPatchEdit edit) {
  return diffMatchPatch.patchMake(asDiffUtilDiffs(edit.diff().diffs()));
}
origin: org.jboss.aerogear/sync-diffmatchpatch-core

jgen.writeArrayFieldStart("diffs");
if (edit.diff() != null) {
  for (DiffMatchPatchDiff diff : edit.diff().diffs()) {
    jgen.writeStartObject();
    jgen.writeStringField("operation", diff.operation().toString());
org.jboss.aerogear.sync.diffmatchpatchDiffMatchPatchDiffs

Most used methods

  • diffs
  • <init>
  • equals
  • hashCode

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JTable (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 25 Plugins for Webstorm
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