## org.biojavax.ontology
Interface ComparableTriple

All Superinterfaces:
  Annotatable, Changeable, Comparable, Term, Triple

All Known Implementing Classes:
  SimpleComparableTriple

    public interface ComparableTriple

extends Triple, Comparable, Changeable

Comparable triples, obviously. Allows them to have descriptors.

Since:
  1.5
Author:
  Richard Holland

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojava.ontology.Triple
`Triple.Impl`

Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
`Annotatable.AnnotationForwarder`

Field Summary
`static ChangeType` `DESCRIPTOR`

Fields inherited from interface org.biojava.ontology.Term
`ONTOLOGY`

Fields inherited from interface org.biojava.bio.Annotatable
`ANNOTATION`

Method Summary
`void` `addDescriptor(ComparableTerm desc)` Adds a descriptor.
`Set` `getDescriptors()` Returns all descriptors.
`boolean` `removeDescriptor(ComparableTerm desc)` Removes a descriptor.
`void` `setDescriptors(Set descriptors)` Clears the current set of descriptors and replaces it with the content of the set passed.

Methods inherited from interface org.biojava.ontology.Triple
`equals, getObject, getPredicate, getSubject, hashCode`

Methods inherited from interface org.biojava.ontology.Term
`addSynonym, getDescription, getName, getOntology, getSynonyms, removeSynonym, setDescription`

Methods inherited from interface org.biojava.bio.Annotatable
`getAnnotation`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Methods inherited from interface java.lang.Comparable
`compareTo`

Field Detail

### DESCRIPTOR

    static final ChangeType DESCRIPTOR

Method Detail

### addDescriptor

    void addDescriptor(ComparableTerm desc)
                       throws AlreadyExistsException,
                              IllegalArgumentException,
                              ChangeVetoException

  Adds a descriptor. Must not be null.

  Parameters:
    `desc` - the descriptor to add.
  Throws:
    `ChangeVetoException` - in case of objections.
    `AlreadyExistsException` - if the descriptor already exists.
    `IllegalArgumentException` - if the descriptor is missing.

### removeDescriptor

    boolean removeDescriptor(ComparableTerm desc)
                             throws IllegalArgumentException,
                                    ChangeVetoException

  Removes a descriptor. Must not be null.

  Parameters:
    `desc` - the descriptor to remove.
  Returns:
    True if it did it, false if the descriptor did not exist.
  Throws:
    `ChangeVetoException` - in case of objections.
    `IllegalArgumentException` - if the descriptor is missing.

### setDescriptors

    void setDescriptors(Set descriptors)
                        throws ChangeVetoException

  Clears the current set of descriptors and replaces it with the content of the set passed.

  Parameters:
    `descriptors` - the set of ComparableTerm descriptors to add.
  Throws:
    `ChangeVetoException` - in case of objections.
  See Also:
    `ComparableTerm`

### getDescriptors

    Set getDescriptors()

  Returns all descriptors.

  Returns:
    a set of all ComparableTerm descriptors, possibly empty.
  See Also:
    `ComparableTerm`