# Class SymbolicName

java.lang.Object
net.sf.statcvs.model.SymbolicName

All Implemented Interfaces:
  `Comparable`

public class SymbolicName extends Object implements Comparable
Represents a symbolic name (tags). It is a container for `Revision`s.

Version:
  $Id: SymbolicName.java,v 1.6 2009/08/20 17:44:05 benoitx Exp $
Author:
  Tammo van Lessen

## Constructor Summary

Constructors
Constructor
Description
`SymbolicName(String name)`
Creates a new symbolic name.
`SymbolicName(String name, Date date)`
Creates a new symbolic name.

## Method Summary

Modifier and Type
Method
Description
`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 `Revision`s contained in this symbolic name.
`int`
`hashCode()`
`String`
`toString()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### 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

### 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

## Method Details

### getName

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

Returns:
  the symbolic name's name.

### addRevision

protected void addRevision(Revision rev)
Adds a revision to this symbolic name.

Parameters:
  `rev` - the revision

### getRevisions

public SortedSet getRevisions()
Returns a set of `Revision`s contained in this symbolic name.

Returns:
  the revisions

### getDate

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

Returns:
  the smbolic name's date

### compareTo

public int compareTo(Object o)

Specified by:
  `compareTo` in interface `Comparable`
See Also:
  - `Comparable.compareTo(java.lang.Object)`

### toString

public String toString()

Overrides:
  `toString` in class `Object`
See Also:
  - `Object.toString()`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`
See Also:
  - `Object.equals(java.lang.Object)`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`
See Also:
  - `Object.hashCode()`