Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.core.variants
Class ThreeWayResourceComparator

java.lang.Object
  extended by 
org.eclipse.team.core.variants.ThreeWayResourceComparator
All Implemented Interfaces:
IResourceVariantComparator

public class ThreeWayResourceComparator
extends Object
implements IResourceVariantComparator

A resource comparator that uses the ThreeWaySynchronizer to compare local resources to their resource variants. The local state is determined using the local modification state and the remote state is determined by comparing the base bytes to the remote bytes obtained from the synchronizer.

Since:
3.0

Constructor Summary
ThreeWayResourceComparator ( ThreeWaySynchronizer synchronizer)
          Create a three-way resource comparator that uses the ThreeWaySynchronizer to compare a local resource to a resource variant.
 
Method Summary
 boolean compare ( IResource local, IResourceVariant remote)
          Returns true if the local resource matches the remote resource based on this criteria and false otherwise.
 boolean compare ( IResourceVariant base, IResourceVariant remote)
          Returns true if the base resource matches the remote resource based on this criteria and false otherwise.
 boolean isThreeWay ()
          Answers true if the base tree is maintained by this comparator's subscriber.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreeWayResourceComparator

public ThreeWayResourceComparator(
ThreeWaySynchronizer synchronizer)
Create a three-way resource comparator that uses the ThreeWaySynchronizer to compare a local resource to a resource variant.

Parameters:
synchronizer -
Method Detail

compare

public boolean compare(
IResource local,
                       
IResourceVariant remote)
Description copied from interface: IResourceVariantComparator
Returns true if the local resource matches the remote resource based on this criteria and false otherwise. Comparing should be fast and based on cached information.

Specified by:
compare in interface IResourceVariantComparator
Parameters:
local - the local resource to be compared
remote - the remote resources to be compared
Returns:
true if local and remote are equal based on this criteria and false otherwise.

compare

public boolean compare(
IResourceVariant base,
                       
IResourceVariant remote)
Description copied from interface: IResourceVariantComparator
Returns true if the base resource matches the remote resource based on this criteria and false otherwise. Comparing should be fast and based on cached information.

Specified by:
compare in interface IResourceVariantComparator
Parameters:
base - the base resource to be compared
remote - the remote resources to be compared
Returns:
true if base and remote are equal based on this criteria and false otherwise.

isThreeWay

public boolean isThreeWay()
Description copied from interface: IResourceVariantComparator
Answers true if 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.

Specified by:
isThreeWay in interface IResourceVariantComparator
Returns:
whether this comparator is three-way or two-way

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire