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:
ComparisonTextRegionWrapperOrderer
,MatchedBslModuleSectionOrderer
,MatchedEmfObjectOrderer
,MatchedMdObjectOrderer
An abstract orderer of matched objects.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMatchedObjectOrderer
(Collection<U> matchedObjects, boolean isThreeWay) Constructs an orderer. -
Method Summary
Modifier and TypeMethodDescriptionReturns the matched objects this orderer is working with.protected abstract int
getOrder
(U object, ComparisonSide side) Returns the original order index of the source object on the specified side.getOrdered
(ComparisonSide orderSide) Returns a list of matched objects ordered according to the specified side.getWithChangedOrder
(ComparisonSide side1, ComparisonSide side2) Returns a list of matched objects whose order was changed between the specified sides.protected abstract boolean
isPresent
(U object, ComparisonSide side) Checks whether a source object is present on the specified side of the matched object.
-
Constructor Details
-
AbstractMatchedObjectOrderer
Constructs an orderer.- Parameters:
matchedObjects
- the matched objects to work with, cannot benull
isThreeWay
- tells whether the comparison session is three-way
-
-
Method Details
-
getMatchedObjects
Returns the matched objects this orderer is working with.- Returns:
- the matched objects
-
getOrdered
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 benull
- Returns:
- the list of matched ordered objects, never
null
-
getWithChangedOrder
Returns a list of matched objects whose order was changed between the specified sides.- Parameters:
side1
-side2
-- Returns:
-
isPresent
Checks whether a source object is present on the specified side of the matched object.- Parameters:
object
- the matched objectside
- the source side to check- Returns:
true
when the source object is present
-
getOrder
Returns the original order index of the source object on the specified side.- Parameters:
object
- the matched objectside
- the side of the source object- Returns:
- order index of the source object (irrelevant if the object is not present)
-