com.atlassian.diff
Class DiffViewBean
java.lang.Object
com.atlassian.diff.DiffViewBean
public class DiffViewBean
- extends Object
A wrapper class to provide additional views on a list of DiffChunk
s retrieved from the
WordLevelDiffer
.
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getOriginalChunks
public List<DiffChunk> getOriginalChunks()
- Returns:
- only the chunks that would have been present in the original text i.e. no Added Chunks
getRevisedChunks
public List<DiffChunk> getRevisedChunks()
- Returns:
- only the chunks that are present in the revised text i.e. no Deleted Chunks
getUnifiedChunks
public List<DiffChunk> getUnifiedChunks()
- Returns:
- all the chunks in a single list
createWordLevelDiff
public static DiffViewBean createWordLevelDiff(String originalLine,
String revisedLine)
- Creates a
DiffViewBean
for the given original and revised text lines.
- Parameters:
originalLine
- the original line of textrevisedLine
- the revised line of text
- Returns:
- the diff view bean; or null if there was an exception thrown while calculating the diff.
Copyright © 2002-2014 Atlassian. All Rights Reserved.