Package org.xwiki.extension.xar.job.diff
Class EntityUnifiedDiff<T extends EntityReference>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,List<org.xwiki.diff.display.UnifiedDiffBlock<String,Character>>>
-
- org.xwiki.extension.xar.job.diff.EntityUnifiedDiff<T>
-
- Type Parameters:
T
- the entity type
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,List<org.xwiki.diff.display.UnifiedDiffBlock<String,Character>>>
- Direct Known Subclasses:
DocumentUnifiedDiff
public class EntityUnifiedDiff<T extends EntityReference> extends LinkedHashMap<String,List<org.xwiki.diff.display.UnifiedDiffBlock<String,Character>>>
Holds the differences, in unified format, between two versions of an entity.- Since:
- 7.0RC1
- Version:
- $Id: 61b3a3bfb2daea94407cde3c2002a4b4e788db85 $
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description EntityUnifiedDiff(T previousReference, T nextReference)
Creates a new instance to hold the differences between the specified entity versions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getNextReference()
T
getPreviousReference()
T
getReference()
org.xwiki.diff.Delta.Type
getType()
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Constructor Detail
-
EntityUnifiedDiff
public EntityUnifiedDiff(T previousReference, T nextReference)
Creates a new instance to hold the differences between the specified entity versions.- Parameters:
previousReference
- the reference to the previous version of the entitynextReference
- the reference to the next version of the entity
-
-
Method Detail
-
getPreviousReference
public T getPreviousReference()
- Returns:
- the reference to the previous version of the entity
-
getNextReference
public T getNextReference()
- Returns:
- the reference to the previous version of the entity
-
getReference
public T getReference()
- Returns:
- the reference to the entity whose versions are being compared
-
getType
public org.xwiki.diff.Delta.Type getType()
- Returns:
- whether the entity has been added, deleted or modified
-
-