org.xwiki.diff.internal
Class AbstractDelta<E>
java.lang.Object
org.xwiki.diff.internal.AbstractDelta<E>
- Type Parameters:
E
- the type of compared elements
- All Implemented Interfaces:
- Delta<E>
- Direct Known Subclasses:
- ChangeDelta, DeleteDelta, InsertDelta
public abstract class AbstractDelta<E>
- extends Object
- implements Delta<E>
Base class used for various types of Delta
s.
Nested classes/interfaces inherited from interface org.xwiki.diff.Delta |
Delta.Type |
AbstractDelta
public AbstractDelta(Chunk<E> previous,
Chunk<E> next,
Delta.Type type)
- Parameters:
previous
- the chunk before the modificationnext
- the chunk after the modificationtype
- the type of modification applied to the list
AbstractDelta
public AbstractDelta(difflib.Chunk original,
difflib.Chunk revised,
Delta.Type type)
- Parameters:
original
- the chunk before the modificationrevised
- the chunk after the modificationtype
- the type of modification applied to the list
getType
public Delta.Type getType()
- Specified by:
getType
in interface Delta<E>
- Returns:
- the type of modification applied to the list
getPrevious
public Chunk<E> getPrevious()
- Specified by:
getPrevious
in interface Delta<E>
- Returns:
- the chunk before the modification
setPrevious
public void setPrevious(Chunk<E> previous)
- Parameters:
previous
- the chunk before the modification
getNext
public Chunk<E> getNext()
- Specified by:
getNext
in interface Delta<E>
- Returns:
- the chunk after the modification
setNext
public void setNext(Chunk<E> next)
- Parameters:
next
- the chunk after the modification
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object