|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.cddb.Track
public class Track
Track objects represent the leaf elements of Composition objects defined as a specific track on a particular music CD.
A Track object may be contained by several Composition objects, while the association is maintained soley from the Composition object. Contributions added to a track may 'override' an equal contribution that is already associated with this track through its membership in a composition.
Any operation on the embedded Set objects must be synchronized externally.
Composition,
Contribution,
CDID,
Serialized Form| Constructor Summary | |
|---|---|
Track(CDID cd,
int trackNo,
String title,
String description)
|
|
| Method Summary | |
|---|---|
boolean |
add(Contribution con)
adds a contribution specific to this single track |
int |
compareTo(Track t)
|
boolean |
contains(Contribution con)
|
boolean |
equals(Object obj)
a track is equal if cd and trackNo are equal |
Set<Contribution> |
getAllContributions()
generates an unmodifiable view of all associated contributions (including contributions from parent Compositions). |
CDID |
getCD()
|
Set<Composition> |
getCompositions()
provides an unmodifiable view of the Composition objects that this track is associated with |
String |
getDescription()
|
int |
getLength()
returns the length in seconds |
String |
getRecordingType()
examples are DDD, AAD, and the alike. |
String |
getTitle()
|
Set<Contribution> |
getTrackContributions()
provides an unmodifiable view of contributions that were directly added to this track |
int |
getTrackNo()
|
int |
hashCode()
|
boolean |
remove(Contribution con)
|
void |
setDescription(String description)
|
void |
setRecordingType(String type)
examples are DDD, AAD, and the alike. |
void |
setTitle(String title)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Track(CDID cd,
int trackNo,
String title,
String description)
| Method Detail |
|---|
public CDID getCD()
public int getTrackNo()
public String getRecordingType()
public void setRecordingType(String type)
public int getLength()
CDID.getTrackLength(int)public String getTitle()
public void setTitle(String title)
public String getDescription()
public void setDescription(String description)
public boolean contains(Contribution con)
public boolean add(Contribution con)
public boolean remove(Contribution con)
public Set<Contribution> getTrackContributions()
public Set<Contribution> getAllContributions()
getCompositions()public Set<Composition> getCompositions()
Composition.add(Track),
Composition.remove(Track)public int compareTo(Track t)
compareTo in interface Comparable<Track>public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||