Holger's
Java API

com.antelmann.cddb
Class Resource

java.lang.Object
  extended by com.antelmann.cddb.Resource
All Implemented Interfaces:
Serializable, Comparable<Resource>
Direct Known Subclasses:
Artist, Group

public class Resource
extends Object
implements Comparable<Resource>, Serializable

Resource is the abstract notion of 'something' or 'someone' that can contribute to a composition via a given role. A resource could be an artist, an orchestra, a location, an instrument or anything else you may think of.

Author:
Holger Antelmann
See Also:
Role, Composition, Serialized Form

Constructor Summary
Resource(String name, String description)
          Resource objects are to be uniquely identifiable by their name
 
Method Summary
 int compareTo(Resource r)
          compares by the name
 boolean equals(Object obj)
          checks the name to be equal (after checking being an instance of Resource)
 String getDescription()
           
 String getName()
           
 int hashCode()
           
 void setDescription(String description)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource(String name,
                String description)
Resource objects are to be uniquely identifiable by their name

Method Detail

getName

public String getName()

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Resource r)
compares by the name

Specified by:
compareTo in interface Comparable<Resource>

equals

public boolean equals(Object obj)
checks the name to be equal (after checking being an instance of Resource)

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads