Eclipse Platform
Release 3.1

org.eclipse.team.core.synchronize
Interface ISyncInfoSet

All Known Subinterfaces:
ISyncInfoTree
All Known Implementing Classes:
SyncInfoSet, SyncInfoTree

public interface ISyncInfoSet

A dynamic collection of SyncInfo objects that provides change notification to registered listeners. Batching of change notifications can be accomplished using the beginInput/endInput methods.

This interface is not intended to be implemented by clients. Clients that need an instance of a set can use either a SyncInfoSet or SyncInfoTree

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/Team team.

Since:
3.2
See Also:
SyncInfoSet, SyncInfoTree

Method Summary
 void addSyncSetChangedListener(ISyncInfoSetChangeListener listener)
          Registers the given listener for sync info set notifications.
 IResource[] getResources()
          Return all out-of-sync resources contained in this set.
 SyncInfo getSyncInfo(IResource resource)
          Return the SyncInfo for the given resource or null if the resource is not contained in the set.
 SyncInfo[] getSyncInfos()
          Return an array of SyncInfo for all out-of-sync resources that are contained by the set.
 boolean isEmpty()
          Return whether the set is empty.
 Iterator iterator()
          Return an iterator over all SyncInfo contained in this set.
 void removeSyncSetChangedListener(ISyncInfoSetChangeListener listener)
          Removes the given listener from participant notifications.
 int size()
          Return the number of out-of-sync resources contained in this set.
 

Method Detail

getSyncInfos

public SyncInfo[] getSyncInfos()
Return an array of SyncInfo for all out-of-sync resources that are contained by the set.

Returns:
an array of SyncInfo

getResources

public IResource[] getResources()
Return all out-of-sync resources contained in this set. The default implementation uses getSyncInfos() to determine the resources contained in the set. Subclasses may override to optimize.

Returns:
all out-of-sync resources contained in the set

getSyncInfo

public SyncInfo getSyncInfo(IResource resource)
Return the SyncInfo for the given resource or null if the resource is not contained in the set.

Parameters:
resource - the resource
Returns:
the SyncInfo for the resource or null if the resource is in-sync or doesn't have synchronization information in this set.

size

public int size()
Return the number of out-of-sync resources contained in this set.

Returns:
the size of the set.
See Also:
#countFor(int, int)

isEmpty

public boolean isEmpty()
Return whether the set is empty.

Returns:
true if the set is empty

iterator

public Iterator iterator()
Return an iterator over all SyncInfo contained in this set.

Returns:
an iterator over all SyncInfo contained in this set.

addSyncSetChangedListener

public void addSyncSetChangedListener(ISyncInfoSetChangeListener listener)
Registers the given listener for sync info set notifications. Has no effect if an identical listener is already registered.

Parameters:
listener - listener to register

removeSyncSetChangedListener

public void removeSyncSetChangedListener(ISyncInfoSetChangeListener listener)
Removes the given listener from participant notifications. Has no effect if listener is not already registered.

Parameters:
listener - listener to remove

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.