com.starbase.starteam
Class RevisionID

java.lang.Object
  |
  +--com.starbase.starteam.RevisionID

public class RevisionID
extends java.lang.Object

A simple class representing a unique revision of an Item in the repository. For items of the same type revisions can be uniquely int a repository byte the item's objectID and revision number.

See Also:
Item, Type, Item.getObjectID(), Item.getRevisionNumber()

Constructor Summary
RevisionID(int objectID, int revision)
          Create a new RevisionID based on the specified object ID and revision number.
 
Method Summary
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 int getObjectID()
          Returns the revision identifier's object ID.
 int getRevision()
          Returns the revision identifier's revision number.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean isTip()
          Return true if the revision identifier represents the "tip" revision of a branch.
 void setObjectID(int objectID)
          Sets the revision idenitifier's object ID.
 void setRevision(int revision)
          Sets the revision idenitifier's revision number.
 java.lang.String toString()
          Returns a string representation of the revision identifier.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RevisionID

public RevisionID(int objectID,
                  int revision)
Create a new RevisionID based on the specified object ID and revision number.

Parameters:
objectID - the revision identifier's object ID
revision - the revision identifier's revision number
See Also:
Item.getObjectID(), Item.getRevisionNumber()
Method Detail

getObjectID

public int getObjectID()
Returns the revision identifier's object ID.

Returns:
the revision identifier's object ID.

setObjectID

public void setObjectID(int objectID)
Sets the revision idenitifier's object ID.

Parameters:
objectID - the revision identifier's object ID.

getRevision

public int getRevision()
Returns the revision identifier's revision number.

Returns:
the revision identifier's revision number.

setRevision

public void setRevision(int revision)
Sets the revision idenitifier's revision number.


isTip

public boolean isTip()
Return true if the revision identifier represents the "tip" revision of a branch. This is defined as a revision number equal to -1.

Returns:
true if the revision identifier represents the "tip" revision of a branch.

toString

public java.lang.String toString()
Returns a string representation of the revision identifier.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the revision identifier.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.