Package com._1c.g5.v8.dt.compare.order
Class AbstractMatchedObjectOrderer<U>
- java.lang.Object
- 
- com._1c.g5.v8.dt.compare.order.AbstractMatchedObjectOrderer<U>
 
- 
- Type Parameters:
- U- the type of matched objects
 - Direct Known Subclasses:
- MatchedEmfObjectOrderer,- MatchedMdObjectOrderer
 
 public abstract class AbstractMatchedObjectOrderer<U> extends Object An abstract orderer of matched objects.
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractMatchedObjectOrderer(Collection<U> matchedObjects, boolean isThreeWay)Constructs an orderer.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Collection<U>getMatchedObjects()Returns the matched objects this orderer is working with.protected abstract intgetOrder(U object, ComparisonSide side)Returns the original order index of the source object on the specified side.List<U>getOrdered(ComparisonSide orderSide)Returns a list of matched objects ordered according to the specified side.List<U>getWithChangedOrder(ComparisonSide side1, ComparisonSide side2)Returns a list of matched objects whose order was changed between the specified sides.protected abstract booleanisPresent(U object, ComparisonSide side)Checks whether a source object is present on the specified side of the matched object.
 
- 
- 
- 
Constructor Detail- 
AbstractMatchedObjectOrdererprotected AbstractMatchedObjectOrderer(Collection<U> matchedObjects, boolean isThreeWay) Constructs an orderer.- Parameters:
- matchedObjects- the matched objects to work with, cannot be- null
- isThreeWay- tells whether the comparison session is three-way
 
 
- 
 - 
Method Detail- 
getMatchedObjectspublic Collection<U> getMatchedObjects() Returns the matched objects this orderer is working with.- Returns:
- the matched objects
 
 - 
getOrderedpublic List<U> getOrdered(ComparisonSide orderSide) Returns a list of matched objects ordered according to the specified side.- Parameters:
- orderSide- the side that will be used to determine the resulting order, must be either MAIN or OTHER, cannot be- null
- Returns:
- the list of matched ordered objects, never null
 
 - 
getWithChangedOrderpublic List<U> getWithChangedOrder(ComparisonSide side1, ComparisonSide side2) Returns a list of matched objects whose order was changed between the specified sides.- Parameters:
- side1-
- side2-
- Returns:
 
 - 
isPresentprotected abstract boolean isPresent(U object, ComparisonSide side) Checks whether a source object is present on the specified side of the matched object.- Parameters:
- object- the matched object
- side- the source side to check
- Returns:
- truewhen the source object is present
 
 - 
getOrderprotected abstract int getOrder(U object, ComparisonSide side) Returns the original order index of the source object on the specified side.- Parameters:
- object- the matched object
- side- the side of the source object
- Returns:
- order index of the source object (irrelevant if the object is not present)
 
 
- 
 
-