com.microsoft.tfs.core.clients.versioncontrol
Class WorkspaceKey

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.WorkspaceKey

public class WorkspaceKey
extends java.lang.Object

WorkspaceKey is a subclass of ConnectionKey that adds a workspace name attribute to the key. It can be used to cache workspaces or workspace-related data in an environment where multiple connections are anticipated. For more information, see the documentation on ConnectionKey.

Since:
TEE-SDK-10.1
Thread-safety:
immutable

Constructor Summary
WorkspaceKey(Workspace workspace)
          Creates a new WorkspaceKey for the specified workspace.
WorkspaceKey(WorkspaceInfo cachedWorkspace)
          Creates a new WorkspaceKey for the specified cached workspace.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getOwnerName()
           
 java.lang.String getWorkspaceName()
           
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkspaceKey

public WorkspaceKey(Workspace workspace)
Creates a new WorkspaceKey for the specified workspace.

Parameters:
workspace - the workspace to key (must not be null)

WorkspaceKey

public WorkspaceKey(WorkspaceInfo cachedWorkspace)
Creates a new WorkspaceKey for the specified cached workspace.

Parameters:
cachedWorkspace - the cached workspace to key (must not be null)
Method Detail

getWorkspaceName

public java.lang.String getWorkspaceName()
Returns:
this key's workspace name (never null)

getOwnerName

public java.lang.String getOwnerName()
Returns:
this key's owner name (never null)

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object


© 2015 Microsoft. All rights reserved.