001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022
023package org.biojava.bio.symbol;
024
025import java.util.List;
026
027/**
028 * <p>
029 * A symbol that can be represented as a string of Symbols.
030 * </p>
031 *
032 * <p>
033 * BasisSymbol instances can always be represented uniquely as a single List of
034 * BasisSymbol instances. The symbol N is a BasisSymbol - it can be uniquely
035 * represented by N. It matches {a, g, c, t}.
036 * Similarly, the symbol atn is a BasisSymbol, as it can be uniquely
037 * represented with a single list of symbols [a, t, n]. Its getMatches will
038 * return the set {ata, att, atg, atc}.
039 * </p>
040 *
041 * <p>
042 * The getSymbols method returns the unique list of BasisSymbol instances that
043 * this is composed from. For example, the codon ambiguity symbol atn will have
044 * a getSymbols method that returns the list [a, t, n]. The getMatches method
045 * will return an Alphabet containing each AtomicSymbol that can be made by
046 * expanding the list of BasisSymbol instances.
047 * </p>
048 *
049 * @author Matthew Pocock
050 * @since 1.1
051 */
052public interface BasisSymbol extends Symbol {
053  /**
054   * <p>
055   * The list of symbols that this symbol is composed from.
056   * </p>
057   *
058   * <p>
059   * In the usual case, this list will contain just this single symbol. In the
060   * case where a symbol represents an ordered combination of other symbols,
061   * the list will contain each of these BasisSymbols.
062   * </p>
063   *
064   * @return the List of Symbols that this Symbol is built from
065   */
066  List getSymbols();
067}