com.starteam.diff
Class ParsedCharSequence

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

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

A ParsedChar Sequence


Constructor Summary
ParsedCharSequence(CharSequence sequence)
          Construct a Parsed Char Sequence
ParsedCharSequence(CharSequence sequence, char delimiter)
          construct a parsed char sequence
ParsedCharSequence(java.io.File source)
          Construct a Parsed Char Sequence
ParsedCharSequence(java.io.File source, boolean bIgnoreEOLs)
          Construct a Parsed Char Sequence
ParsedCharSequence(java.io.File source, Encoding encoding)
          Construct a Parsed Char Sequence
ParsedCharSequence(java.io.File source, Encoding encoding, boolean bIgnoreEOLs)
          Construct a Parsed Char Sequence
ParsedCharSequence(LineReader reader)
          Construct a Parsed Char Sequence
ParsedCharSequence(java.io.Reader reader)
          Construct a Parsed Char Sequence
 
Method Summary
 boolean add(java.lang.Object o)
          add an object
 void addLine(CharSequence aLine)
          Add a Char Sequence
 boolean endsWithEOL()
          Returns true if the content being parsed ends with an EOL character
 java.lang.Object get(int index)
          returns the CharSequence at a given line
 CharSequence getLine(int n)
          returns the CharSequence at a given line
 int getSize()
          returns the size of the sequence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsedCharSequence

public ParsedCharSequence(CharSequence sequence)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
sequence - the sequence
Throws:
java.io.IOException - throws an exception on error

ParsedCharSequence

public ParsedCharSequence(CharSequence sequence,
                          char delimiter)
                   throws java.io.IOException
construct a parsed char sequence

Parameters:
sequence - the char sequence
delimiter - the delimiter to use
Throws:
java.io.IOException - throws an excpetion on error

ParsedCharSequence

public ParsedCharSequence(java.io.Reader reader)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
reader - the reader
Throws:
java.io.IOException - throws an exception on error

ParsedCharSequence

public ParsedCharSequence(LineReader reader)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
reader - the reader
Throws:
java.io.IOException - throws an exception on error

ParsedCharSequence

public ParsedCharSequence(java.io.File source)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
source - a source file
Throws:
java.io.IOException - throw an exception on error

ParsedCharSequence

public ParsedCharSequence(java.io.File source,
                          Encoding encoding)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
source - a source file
encoding - an Encoding
Throws:
java.io.IOException - throw an exception on error

ParsedCharSequence

public ParsedCharSequence(java.io.File source,
                          boolean bIgnoreEOLs)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
source - a source file
bIgnoreEOLs - true to ignore EOLs
Throws:
java.io.IOException - throw an exception on error

ParsedCharSequence

public ParsedCharSequence(java.io.File source,
                          Encoding encoding,
                          boolean bIgnoreEOLs)
                   throws java.io.IOException
Construct a Parsed Char Sequence

Parameters:
source - the source file
encoding - the encoding
bIgnoreEOLs - true to ignore EOLs
Throws:
java.io.IOException - throw an exception on error
Method Detail

addLine

public void addLine(CharSequence aLine)
Add a Char Sequence

Parameters:
aLine - the char sequence

getLine

public CharSequence getLine(int n)
returns the CharSequence at a given line

Parameters:
n - the index of the given line
Returns:
the char sequence

getSize

public int getSize()
returns the size of the sequence

Specified by:
getSize in interface Sequence
Returns:
the size of the sequence

add

public boolean add(java.lang.Object o)
add an object

Specified by:
add in interface Sequence
Parameters:
o - the object to add
Returns:
true if the object was added

get

public java.lang.Object get(int index)
returns the CharSequence at a given line

Specified by:
get in interface Sequence
Parameters:
index - the index of the given line
Returns:
the char sequence

endsWithEOL

public boolean endsWithEOL()
Returns true if the content being parsed ends with an EOL character

Returns:
boolean true if the content being parsed ends with an EOL character


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