Package com._1c.g5.v8.dt.compare.model
Class ComparedObjects<T>
- java.lang.Object
- 
- com._1c.g5.v8.dt.compare.model.ComparedObjects<T>
 
- 
- All Implemented Interfaces:
- IComparedObjects<T>,- Cloneable
 - Direct Known Subclasses:
- AbstractComparedEmfObjects,- ComparedSymlinks,- ComparedUniqueSymlinks
 
 public class ComparedObjects<T> extends Object implements IComparedObjects<T>, Cloneable A standard implementation of a triple of objects being compared.
- 
- 
Constructor SummaryConstructors Constructor Description ComparedObjects()Constructs an empty provider.ComparedObjects(T main, T other, T commonAncestor)Constructs a triple of objects being compared.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IComparedObjects<T>clone()Clones the compared object containerTgetCommonAncestorObject()Returns the common ancestor object.TgetComparedObject(ComparisonSide side)Returns a compared object on the specified side.TgetMainObject()Returns the main object.ComparisonSidegetObjectSide()Returns MAIN or OTHER side if the object presents only on the one of them.intgetOrder(ComparisonSide side)Returns the order index of the source object from the specified side.TgetOtherObject()Returns the other object.ComparedObjectPathgetPath(ComparisonSide side)Returns path to the compared object.voidsetComparedObject(ComparisonSide side, T object)Sets the compared object for the specified side.voidsetOrder(ComparisonSide side, int order)Sets the order index of a source object on the specified side.voidsetPath(ComparisonSide side, ComparedObjectPath path)Sets the path to the compared object.
 
- 
- 
- 
Method Detail- 
getMainObjectpublic T getMainObject() Description copied from interface:IComparedObjectsReturns the main object.- Specified by:
- getMainObjectin interface- IComparedObjects<T>
- Returns:
- the main object or null
 
 - 
getOtherObjectpublic T getOtherObject() Description copied from interface:IComparedObjectsReturns the other object.- Specified by:
- getOtherObjectin interface- IComparedObjects<T>
- Returns:
- the other object or null
 
 - 
getCommonAncestorObjectpublic T getCommonAncestorObject() Description copied from interface:IComparedObjectsReturns the common ancestor object.- Specified by:
- getCommonAncestorObjectin interface- IComparedObjects<T>
- Returns:
- the common ancestor object or null
 
 - 
getComparedObjectpublic T getComparedObject(ComparisonSide side) Description copied from interface:IComparedObjectsReturns a compared object on the specified side.- Specified by:
- getComparedObjectin interface- IComparedObjects<T>
- Parameters:
- side- the side to get the object for, not- null
- Returns:
- the object on the side, may be null
 
 - 
setComparedObjectpublic void setComparedObject(ComparisonSide side, T object) Sets the compared object for the specified side.- Specified by:
- setComparedObjectin interface- IComparedObjects<T>
- Parameters:
- side- the side to set the compared object for
- object- the compared object to set
 
 - 
getObjectSidepublic ComparisonSide getObjectSide() Description copied from interface:IComparedObjectsReturns MAIN or OTHER side if the object presents only on the one of them. Fully ignores object's presence on COMMON_ANCESTOR side.- Specified by:
- getObjectSidein interface- IComparedObjects<T>
- Returns:
- the MAIN or OTHER side or nullif it presents on both of them or doesn't present on any of them
 
 - 
getOrderpublic int getOrder(ComparisonSide side) Description copied from interface:IComparedObjectsReturns the order index of the source object from the specified side.- Specified by:
- getOrderin interface- IComparedObjects<T>
- Parameters:
- side- the side of the object, not- null
- Returns:
- the order index or -1 if no order stored
 
 - 
setOrderpublic void setOrder(ComparisonSide side, int order) Description copied from interface:IComparedObjectsSets the order index of a source object on the specified side.- Specified by:
- setOrderin interface- IComparedObjects<T>
- Parameters:
- side- the side of the source object, not- null
- order- the source object order index
 
 - 
getPathpublic ComparedObjectPath getPath(ComparisonSide side) Description copied from interface:IComparedObjectsReturns path to the compared object.- Specified by:
- getPathin interface- IComparedObjects<T>
- Parameters:
- side- the comparison side to get the path for, not- null
- Returns:
- the path to the compared object from the closest top parent, never null
 
 - 
setPathpublic void setPath(ComparisonSide side, ComparedObjectPath path) Description copied from interface:IComparedObjectsSets the path to the compared object.- Specified by:
- setPathin interface- IComparedObjects<T>
- Parameters:
- side- the comparison side to set the path for, cannot- null
- path- the path to set, cannot be- null
 
 - 
clonepublic IComparedObjects<T> clone() throws CloneNotSupportedException Description copied from interface:IComparedObjectsClones the compared object container- Specified by:
- clonein interface- IComparedObjects<T>
- Overrides:
- clonein class- Object
- Returns:
- A new instance of the container of the same class. Never null. Internal data should be eligible for safe changes by the caller side
- Throws:
- CloneNotSupportedException- In case if cloning isn't supported
 
 
- 
 
-