Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.compare
Class CompareUtils

java.lang.Object
  extended by oracle.javatools.compare.CompareUtils


public final class CompareUtils
extends java.lang.Object

Miscellaneous utilities (for the client) that make use of the compare algorithms.


Method Summary
static void replaceText(TextBuffer target, int offset, int length, char[] data)
          Replaces text in the target TextBuffer with the input data with the smallest changes possible.
static int setLimit(int newLimit)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

setLimit

public static int setLimit(int newLimit)

replaceText

public static void replaceText(TextBuffer target,
                               int offset,
                               int length,
                               char[] data)
Replaces text in the target TextBuffer with the input data with the smallest changes possible. In particular, this will use the compare algorithm to determine the smallest changes (to the TextBuffer) to make to the TextBuffer to, in effect, replace the target region of text with the input data text.Used when it's important to preserve OffsetMark's in the TextBuffer.
Parameters:
target - The TextBuffer we'll be making changes to.
offset - The start offset of the target region in "target".
length - The length of the target region in "target".
data - The new characters that we'll be inserting into "target".

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.