ppt4j 1.0
 
Loading...
Searching...
No Matches
ppt4j.diff.BlockDiff Class Reference

Public Member Functions

 BlockDiff (List< Pair< Integer, Line > > lines)
 
List< Integer > getAdditionLines ()
 
List< Integer > getDeletionLines ()
 
boolean isPureAddition ()
 
boolean isPureDeletion ()
 
String toString ()
 

Constructor & Destructor Documentation

◆ BlockDiff()

ppt4j.diff.BlockDiff.BlockDiff ( List< Pair< Integer, Line > > lines)

Member Function Documentation

◆ getAdditionLines()

List< Integer > ppt4j.diff.BlockDiff.getAdditionLines ( )

Returns a list of line numbers that represent additions in a document. An addition line is identified by having a LineType of TO.

Returns
A list of integers representing line numbers of additions

◆ getDeletionLines()

List< Integer > ppt4j.diff.BlockDiff.getDeletionLines ( )

This method retrieves a list of line numbers corresponding to deletion lines in a document. Deletion lines are identified by having a LineType of FROM.

Returns
a list of integers representing line numbers of deletion lines

◆ isPureAddition()

boolean ppt4j.diff.BlockDiff.isPureAddition ( )

Checks if the method only involves addition and no deletion. Returns true if there are no deletion lines present, false otherwise.

Returns
true if there are no deletion lines, false otherwise

◆ isPureDeletion()

boolean ppt4j.diff.BlockDiff.isPureDeletion ( )

This method checks if the current changeset is a pure deletion, meaning that there are no lines added.

Returns
true if the changeset is a pure deletion, false otherwise

◆ toString()

String ppt4j.diff.BlockDiff.toString ( )

Returns a string representation of the object by iterating through each line in the 'lines' list. For each line, appends a prefix '-' if the line type is FROM, '+' if the line type is TO. Throws an IllegalStateException if the line type is neither FROM nor TO. Appends the content of the line followed by a newline character to the StringBuilder. Finally, returns the resulting string.


The documentation for this class was generated from the following file: