com.starteam.diff
Class IntralineSequence

java.lang.Object
  extended by com.starteam.diff.IntralineSequence
All Implemented Interfaces:
Sequence

public final class IntralineSequence
extends java.lang.Object
implements Sequence

Represents a sequence of characters within a line.


Constructor Summary
IntralineSequence(CharSequence chars)
          Constructs an intraline sequence based on a sequence of characters from a single line of text.
IntralineSequence(CharSequence chars, boolean bCharacterBased)
          Constructs an intraline sequence based on a sequence of characters from a single line of text.
 
Method Summary
 boolean add(java.lang.Object o)
          Adds the given element to the sequence.
 java.lang.Object get(int index)
          Gets a given element of the sequence.
static DiffCompare getDiffCompare()
          Gets a DiffCompare interface appropriate for comparing members of an intraline sequence.
 int getSize()
          Gets the number of elements in the sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntralineSequence

public IntralineSequence(CharSequence chars)
Constructs an intraline sequence based on a sequence of characters from a single line of text. A word-based sequence is created by default.

Parameters:
chars - The underlying character sequence.

IntralineSequence

public IntralineSequence(CharSequence chars,
                         boolean bCharacterBased)
Constructs an intraline sequence based on a sequence of characters from a single line of text. Creates a word-based or a character-based sequence, depending on the value of the bCharacterBased parameter.

Parameters:
chars - The underlying character sequence.
bCharacterBased - true to create a character-based sequence (for deep comparison); false to create a word-based sequence (for comparisons that are likely to appear more natural to the user).
Method Detail

add

public boolean add(java.lang.Object o)
Adds the given element to the sequence.

Specified by:
add in interface Sequence
Parameters:
o - The element to be added.
Returns:
true

get

public java.lang.Object get(int index)
Gets a given element of the sequence.

Specified by:
get in interface Sequence
Parameters:
index - The index of the desired element within the sequence.
Returns:
The requested element.

getSize

public int getSize()
Gets the number of elements in the sequence.

Specified by:
getSize in interface Sequence
Returns:
The number of elements in the sequence.

getDiffCompare

public static DiffCompare getDiffCompare()
Gets a DiffCompare interface appropriate for comparing members of an intraline sequence.

Returns:
A DiffCompare interface appropriate for comparing members of an intraline sequence.


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.