Package org.eclipse.team.core.variants
Interface IResourceVariantComparator
-
- All Known Implementing Classes:
ThreeWayResourceComparator
public interface IResourceVariantComparatorAnIResourceVariantComparatoris provided by aSubscriberand used by aSyncInfoto calculate the sync state of the workspace resources. Subscribers should provide a criteria best suited for their environment. For example, an FTP subscriber could choose to use file size or file timestamps as comparison criteria whereas a CVS workspace subscriber would use file revision numbers.- Since:
- 3.0
- See Also:
SyncInfo,Subscriber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancompare(IResource local, IResourceVariant remote)Returnstrueif the local resource matches the remote resource based on this criteria andfalseotherwise.booleancompare(IResourceVariant base, IResourceVariant remote)Returnstrueif the base resource matches the remote resource based on this criteria andfalseotherwise.booleanisThreeWay()Answerstrueif the base tree is maintained by this comparator's subscriber.
-
-
-
Method Detail
-
compare
boolean compare(IResource local, IResourceVariant remote)
Returnstrueif the local resource matches the remote resource based on this criteria andfalseotherwise. Comparing should be fast and based on cached information.- Parameters:
local- the local resource to be comparedremote- the remote resources to be compared- Returns:
trueif local and remote are equal based on this criteria andfalseotherwise.
-
compare
boolean compare(IResourceVariant base, IResourceVariant remote)
Returnstrueif the base resource matches the remote resource based on this criteria andfalseotherwise. Comparing should be fast and based on cached information.- Parameters:
base- the base resource to be comparedremote- the remote resources to be compared- Returns:
trueif base and remote are equal based on this criteria andfalseotherwise.
-
isThreeWay
boolean isThreeWay()
Answerstrueif the base tree is maintained by this comparator's subscriber. If the base tree is not considered than the subscriber can be considered as not supported three-way comparisons. Instead comparisons are made between the local and remote only without consideration for the base.- Returns:
- whether this comparator is three-way or two-way
-
-