Errai 3.0.1-SNAPSHOT

org.jboss.errai.otec.client.util
Class DiffPatchMerge.Diff

java.lang.Object
  extended by org.jboss.errai.otec.client.util.DiffPatchMerge.Diff
Enclosing class:
DiffPatchMerge

public static class DiffPatchMerge.Diff
extends Object

Class representing one diff operation.


Field Summary
 DiffPatchMerge.Operation operation
          One of: INSERT, DELETE or EQUAL.
 String text
          The text associated with this diff operation.
 
Constructor Summary
DiffPatchMerge.Diff(DiffPatchMerge.Operation operation, String text)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          Is this Diff equivalent to another Diff?
 int hashCode()
          Create a numeric hash value for a Diff.
 String toString()
          Display a human-readable version of this Diff.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

operation

public DiffPatchMerge.Operation operation
One of: INSERT, DELETE or EQUAL.


text

public String text
The text associated with this diff operation.

Constructor Detail

DiffPatchMerge.Diff

public DiffPatchMerge.Diff(DiffPatchMerge.Operation operation,
                           String text)
Constructor. Initializes the diff with the provided values.

Parameters:
operation - One of INSERT, DELETE or EQUAL.
text - The text being applied.
Method Detail

toString

public String toString()
Display a human-readable version of this Diff.

Overrides:
toString in class Object
Returns:
text version.

hashCode

public int hashCode()
Create a numeric hash value for a Diff. This function is not used by DMP.

Overrides:
hashCode in class Object
Returns:
Hash value.

equals

public boolean equals(Object obj)
Is this Diff equivalent to another Diff?

Overrides:
equals in class Object
Parameters:
obj - Another Diff to compare against.
Returns:
true or false.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.