Holger's Java API

## com.antelmann.cddb
Class Contribution

    java.lang.Object
      com.antelmann.cddb.Contribution

All Implemented Interfaces:
  Serializable, Comparable<Contribution>

    public class Contribution

extends Object
implements Serializable, Comparable<Contribution>

Contribution represents the association between a resource and a Composition or a Track, where the resource contributes different roles to the composition.

Author:
  Holger Antelmann
See Also:
  `Role`, `Composition`, `Track`, `Resource`, Serialized Form

Constructor Summary
`Contribution(Resource resource, Role role, int importance, String comment)`

Method Summary
`int` `compareTo(Contribution con)` compares objects by their importance and then by their resource (returns 0 if objects are equal for consitency, though)
`boolean` `equals(Object obj)` object is equal if resouce and role are equal
`String` `getComment()`
`int` `getImportance()` the higher the number, the higher the importance.
`Resource` `getResource()`
`Role` `getRole()`
`int` `hashCode()`
`void` `setComment(String comment)`
`void` `setImportance(int n)` the higher the number, the higher the importance

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Contribution

    public Contribution(Resource resource,
                        Role role,
                        int importance,
                        String comment)

Method Detail

### getResource

    public Resource getResource()

### getRole

    public Role getRole()

### getImportance

    public int getImportance()

  the higher the number, the higher the importance. Note that Contribution objects can be equal even though their importance is not.

### setImportance

    public void setImportance(int n)

  the higher the number, the higher the importance

### getComment

    public String getComment()

### setComment

    public void setComment(String comment)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### compareTo

    public int compareTo(Contribution con)

  compares objects by their importance and then by their resource (returns 0 if objects are equal for consitency, though)

  Specified by:
    `compareTo` in interface `Comparable<Contribution>`

### equals

    public boolean equals(Object obj)

  object is equal if resouce and role are equal

  Overrides:
    `equals` 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