org.electrocodeogram.cpc.core.api.provider.reconciler
Interface IDiffResult


public interface IDiffResult

Result wrapper object for the IDiffProvider.

Author:
vw
See Also:
IDiffProvider

Nested Class Summary
static class IDiffResult.Type
          The type of this IDiffResult.
 
Method Summary
 int getLength()
          Retrieves the length of the added or removed text.
 int getOffset()
          Retrieves the 0-based character offset in the source text where this insertion/deletion starts.
 java.lang.String getText()
          Retrieves the text which was inserted or deleted.
 IDiffResult.Type getType()
          Retrieves the type of this diff.
 boolean isDelete()
          Checks whether this is a deletion.
 boolean isInsert()
          Checks whether this is an insertion.
 

Method Detail

getType

IDiffResult.Type getType()
Retrieves the type of this diff.

Returns:
The type of this diff.

getOffset

int getOffset()
Retrieves the 0-based character offset in the source text where this insertion/deletion starts.

Returns:
offset in the source text where this insertion/deletion starts.

getLength

int getLength()
Retrieves the length of the added or removed text.
Convenience method.

Returns:
cached value of length of getText()

getText

java.lang.String getText()
Retrieves the text which was inserted or deleted.

Returns:
The text which was inserted or deleted.

isInsert

boolean isInsert()
Checks whether this is an insertion.
Convenience method.

Returns:
true if this diff was an INSERT.

isDelete

boolean isDelete()
Checks whether this is a deletion.
Convenience method.

Returns:
true if this diff was a DELETE.