## org.biojava.bio.symbol
Class SimpleSymbol

    java.lang.Object
      |
      +--org.biojava.bio.symbol.SimpleSymbol

public class SimpleSymbol
extends java.lang.Object
implements Symbol, java.io.Serializable

A no-frills implementation of a symbol.

Author:
  Matthew Pocock
See Also:
  Serialized Form

Constructor Summary
`SimpleSymbol(char token, java.lang.String name, Alphabet matches, Annotation annotation)` Create a new SimpleSymbol.

Method Summary
`Annotation` `getAnnotation()` Should return the associated annotation object.
`Alphabet` `getMatches()` The alphabet containing the symbols matched by this ambiguity symbol.
`java.lang.String` `getName()` The long name for the symbol.
`char` `getToken()` The token for the symbol.
`void` `setName(java.lang.String name)` Assign a name to the symbol
`java.lang.String` `toString()`

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

Constructor Detail

### SimpleSymbol

    public SimpleSymbol(char token,
                        java.lang.String name,
                        Alphabet matches,
                        Annotation annotation)

  Create a new SimpleSymbol.
  Parameters:
    `token` - the char to represent this symbol when sequences are stringified
    `name` - the long name
    `matches` - the Alphabet of symbols that this symbol can match
    `annotation` - the annotation

Method Detail

### getAnnotation

    public Annotation getAnnotation()

  Description copied from interface: Annotatable
  Should return the associated annotation object.
  Tags copied from interface: Annotatable
  Returns:
    an Annotation object, never null

### getToken

    public char getToken()

  Description copied from interface: Symbol
  The token for the symbol.
  Specified by:
    getToken in interface Symbol
  Tags copied from interface: Symbol
  Returns:
    the token

### getName

    public java.lang.String getName()

  Description copied from interface: Symbol
  The long name for the symbol.
  Specified by:
    getName in interface Symbol
  Tags copied from interface: Symbol
  Returns:
    the long name

### setName

    public void setName(java.lang.String name)

  Assign a name to the symbol
  Parameters:
    `name` - the name you wish to give this symbol

### getMatches

    public Alphabet getMatches()

  Description copied from interface: Symbol
  The alphabet containing the symbols matched by this ambiguity symbol.

  This alphabet contains all of, and only, the symbols matched by this symbol. For example, the symbol representing the DNA ambiguity code for W would contain the symbol for A and T from the DNA alphabet.

  Specified by:
    getMatches in interface Symbol
  Tags copied from interface: Symbol
  Returns:
    the Alphabet of symbols matched by this symbol

### toString

    public java.lang.String toString()

  Overrides:
    toString in class java.lang.Object