Package 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
- Version:
- $Id: 470faae03c6b77f75c3cf1b31b513163eaa998de $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InlineDiffChunk.Type
The possible types of chunks you can find within an in-line diff.
-
Constructor Summary
Constructors Constructor Description InlineDiffChunk(InlineDiffChunk.Type type, List<E> elements)
Creates a new chunk with the specified type and elements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<E>
getElements()
InlineDiffChunk.Type
getType()
int
hashCode()
boolean
isAdded()
boolean
isDeleted()
boolean
isUnmodified()
String
toString()
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
getType
public InlineDiffChunk.Type getType()
- Returns:
- the chunk type
-
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
-
-