Debian Codegraph @

src/dr/evolution/util/MutableTaxonList.java

raw symbols SCIP
1 /*
2 * MutableTaxonList.java
3 *
4 * Copyright (c) 2002-2015 Alexei Drummond, Andrew Rambaut and Marc Suchard
5 *
6 * This file is part of BEAST.
7 * See the NOTICE file distributed with this work for additional
8 * information regarding copyright ownership and licensing.
9 *
10 * BEAST is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as
12 * published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
14 *
15 * BEAST is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with BEAST; if not, write to the
22 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
23 * Boston, MA 02110-1301 USA
24 */
25
26 package dr.evolution.util;
27
28 /**
29 * Interface for a mutable list of taxa.
30 *
31 * @version $Id: MutableTaxonList.java,v 1.6 2005/05/24 20:25:57 rambaut Exp $
32 *
33 * @author Alexei Drummond
34 */
35 public interface MutableTaxonList extends TaxonList {
36
37 /**
38 * @return the index of the newly added taxon.
39 * Add the given taxon to the end of the taxonList;
40 */
41 int addTaxon(Taxon taxon);
42
43 /**
44 * @return true if the taxon was removed, false if it wasn't in the taxonList
45 * Removes the given taxon and renumbers the taxa above it in the list.
46 */
47 boolean removeTaxon(Taxon taxon);
48
49 /**
50 * Sets the ID of the ith taxon.
51 */
52 public void setTaxonId(int taxonIndex, String id);
53
54 /**
55 * Sets an named attribute for a given taxon.
56 * @param taxonIndex the index of the taxon whose attribute is being set.
57 * @param name the name of the attribute.
58 * @param value the new value of the attribute.
59 */
60 public void setTaxonAttribute(int taxonIndex, String name, Object value);
61
62 /**
63 * Adds a listener to this taxon list.
64 */
65 void addMutableTaxonListListener(MutableTaxonListListener listener);
66 }