## org.biojava.bio.taxa
Class WeakTaxon

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.taxa.AbstractTaxon
              org.biojava.bio.taxa.WeakTaxon

All Implemented Interfaces:
  Annotatable, Taxon, Changeable

Deprecated. replaced by classes in `org.biojavax.bio.taxa`

    public class WeakTaxon

extends AbstractTaxon

An implementation of Taxon that keeps only weak references to children, but full references to parents.

This may be suitable for deriving memory-savy implementations of TaxonFactory.

To manipulate the children set, use the getChildrenRaw and setChildrenRaw methods. These 'box' the actual weak reference, but recognize null to mean that there are no children currently known. A code-fragment may wish to do something like this:

     Set children = weakTaxon.getChildrenRaw();
     if(children == null) {
       children = new HashSet();
       weakTaxon.setChildrenRaw(children);
     }
     // do stuff to update child set e.g. add children

Author:
  Matthew Pocock

Nested Class Summary

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

Field Summary
`protected Taxon` `parent` Deprecated.

Fields inherited from interface org.biojava.bio.taxa.Taxon
`CHANGE_COMMON_NAME, CHANGE_SCIENTIFIC_NAME`

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

Constructor Summary
`WeakTaxon()` Deprecated.
`WeakTaxon(String scientificName, String commonName)` Deprecated.

Method Summary
`Set` `getChildren()` Deprecated. The children of this Taxon.
`Set` `getChildrenRaw()` Deprecated.
`Taxon` `getParent()` Deprecated. The parent of this Taxon.
`void` `setChildrenRaw(Set children)` Deprecated.

Methods inherited from class org.biojava.bio.taxa.AbstractTaxon
`equals, getAnnotation, getChangeSupport, getCommonName, getScientificName, hashCode, setCommonName, setScientificName, toString`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener`

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

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

Field Detail

### parent

    protected Taxon parent

  Deprecated.

Constructor Detail

### WeakTaxon

    public WeakTaxon()

  Deprecated.

### WeakTaxon

    public WeakTaxon(String scientificName,
                     String commonName)

  Deprecated.

Method Detail

### getParent

    public Taxon getParent()

  Deprecated.
  Description copied from interface: `Taxon`

  The parent of this Taxon.

  Taxa live within a tree data-structure, so every taxon has a single parent except for the root type. This has the null parent.

  Returns:
    the parent Taxon, or null if this is the root type.

### getChildren

    public Set getChildren()

  Deprecated.
  Description copied from interface: `Taxon`

  The children of this Taxon.

  Taxa live within a tree data-structure, so every taxon has zero or more children. In the case of zero children, the empty set is returned.

  ? read-only ? dynamicaly updated with taxon object ? copy of data ?

  Returns:
    the Set (possibly empty) of all child Taxa

### getChildrenRaw

    public Set getChildrenRaw()

  Deprecated.

### setChildrenRaw

    public void setChildrenRaw(Set children)

  Deprecated.