net.sf.statcvs.model

Class SymbolicName

Implemented Interfaces:
Comparable

public class SymbolicName
extends Object
implements Comparable

Represents a symbolic name (tags). It is a container for Revisions.
Version:
$Id: SymbolicName.java,v 1.5 2008/04/02 11:52:02 benoitx Exp $
Author:
Tammo van Lessen

Constructor Summary

SymbolicName(String name)
Creates a new symbolic name.
SymbolicName(String name, Date date)
Creates a new symbolic name.

Method Summary

protected void
addRevision(Revision rev)
Adds a revision to this symbolic name.
int
compareTo(Object o)
boolean
equals(Object obj)
Date
getDate()
Returns the 'date' of this symbolic name.
String
getName()
Returns the symbolic name's name.
SortedSet
getRevisions()
Returns a set of Revisions contained in this symbolic name.
int
hashCode()
String
toString()

Constructor Details

SymbolicName

public SymbolicName(String name)
Creates a new symbolic name. With this constructor, its creation date will be assumed to be the date of its latest revision.
Parameters:
name - the symbolic name's name

SymbolicName

public SymbolicName(String name,
                    Date date)
Creates a new symbolic name.
Parameters:
name - the symbolic name's name
date - of the symbolic name creation

Method Details

addRevision

protected void addRevision(Revision rev)
Adds a revision to this symbolic name.
Parameters:
rev - the revision

compareTo

public int compareTo(Object o)

equals

public boolean equals(Object obj)

getDate

public Date getDate()
Returns the 'date' of this symbolic name.
Returns:
the smbolic name's date

getName

public String getName()
Returns the symbolic name's name.
Returns:
the symbolic name's name.

getRevisions

public SortedSet getRevisions()
Returns a set of Revisions contained in this symbolic name.
Returns:
the revisions

hashCode

public int hashCode()

toString

public String toString()