org.xwiki.diff.display
Class InlineDiffChunk<E>
java.lang.Object
org.xwiki.diff.display.InlineDiffChunk<E>
- Type Parameters:
E
- the type of elements that form a chunk
public class InlineDiffChunk<E>
- extends Object
A group of consecutive elements that are targeted by the same operation (add, remove, keep) in an in-line diff.
- Since:
- 4.1RC1
Nested Class Summary |
static class |
InlineDiffChunk.Type
The possible types of chunks you can find within an in-line diff. |
InlineDiffChunk
public InlineDiffChunk(InlineDiffChunk.Type type,
List<E> elements)
- Creates a new chunk with the specified type and elements.
- Parameters:
type
- the chunk typeelements
- the list of elements that form the chunk
getType
public InlineDiffChunk.Type getType()
- Returns:
- the chunk type
getElements
public List<E> getElements()
- Returns:
- the list of element that form this chunk
isAdded
public boolean isAdded()
- Returns:
true
if this chunk was added, false
otherwise
isDeleted
public boolean isDeleted()
- Returns:
true
if this chunk was deleted, false
otherwise
isUnmodified
public boolean isUnmodified()
- Returns:
true
if this chunk was left unmodified, false
otherwise
toString
public String toString()
- Overrides:
toString
in class Object