org.test4j.tools.commons
类 TextDiffMatchPatch.Diff

java.lang.Object
  继承者 org.test4j.tools.commons.TextDiffMatchPatch.Diff
包容类:
TextDiffMatchPatch

public static class TextDiffMatchPatch.Diff
extends Object

Class representing one diff operation.


字段摘要
 TextDiffMatchPatch.Operation operation
          One of: INSERT, DELETE or EQUAL.
 String text
          The text associated with this diff operation.
 
构造方法摘要
TextDiffMatchPatch.Diff(TextDiffMatchPatch.Operation operation, String text)
          Constructor.
 
方法摘要
 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.
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

字段详细信息

operation

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


text

public String text
The text associated with this diff operation.

构造方法详细信息

TextDiffMatchPatch.Diff

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

参数:
operation - One of INSERT, DELETE or EQUAL.
text - The text being applied.
方法详细信息

toString

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

覆盖:
Object 中的 toString
返回:
text version.

hashCode

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

覆盖:
Object 中的 hashCode
返回:
Hash value.

equals

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

覆盖:
Object 中的 equals
参数:
obj - Another Diff to compare against.
返回:
true or false.


Copyright © 2013. All rights reserved.