~ubuntu-branches/ubuntu/maverick/cdk/maverick

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/interfaces/IAtomContainerSet.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  $RCSfile$
 
3
 *  $Author: kaihartmann $
 
4
 *  $Date: 2007-01-05 17:31:35 +0100 (Fri, 05 Jan 2007) $
 
5
 *  $Revision: 7645 $
 
6
 *
 
7
 *  Copyright (C) 2006-2007  Egon Willighagen <egonw@users.sf.net>
 
8
 *
 
9
 *  Contact: cdk-devel@lists.sourceforge.net
 
10
 *
 
11
 *  This program is free software; you can redistribute it and/or
 
12
 *  modify it under the terms of the GNU Lesser General Public License
 
13
 *  as published by the Free Software Foundation; either version 2.1
 
14
 *  of the License, or (at your option) any later version.
 
15
 *
 
16
 *  This program is distributed in the hope that it will be useful,
 
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 *  GNU Lesser General Public License for more details.
 
20
 *
 
21
 *  You should have received a copy of the GNU Lesser General Public License
 
22
 *  along with this program; if not, write to the Free Software
 
23
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
24
 */
 
25
package org.openscience.cdk.interfaces;
 
26
 
 
27
/**
 
28
 * A set of AtomContainers.
 
29
 *
 
30
 * @author     egonw
 
31
 * @cdk.module interfaces
 
32
 */
 
33
public interface IAtomContainerSet extends IChemObject {
 
34
 
 
35
        /**
 
36
         * Adds an atomContainer to this container.
 
37
         *
 
38
         * @param  atomContainer  The atomContainer to be added to this container
 
39
         */
 
40
        public void addAtomContainer(IAtomContainer atomContainer);
 
41
 
 
42
        /**
 
43
         * Removes an AtomContainer from this container.
 
44
         *
 
45
         * @param  atomContainer  The atomContainer to be removed from this container
 
46
         */
 
47
        public void removeAtomContainer(IAtomContainer atomContainer);
 
48
 
 
49
        /**
 
50
         * Removes all AtomContainer from this container.
 
51
         */
 
52
        public void removeAllAtomContainers();  
 
53
        
 
54
        /**
 
55
         * Removes an AtomContainer from this container.
 
56
         *
 
57
         * @param  pos  The position of the AtomContainer to be removed from this container
 
58
         */
 
59
        public void removeAtomContainer(int pos);
 
60
        
 
61
        /**
 
62
         * Replace the AtomContainer at a specific position (array has to be large enough).
 
63
         * 
 
64
         * @param position   position in array for AtomContainer
 
65
         * @param container  the replacement AtomContainer
 
66
         */
 
67
        public void replaceAtomContainer(int position, IAtomContainer container);
 
68
        
 
69
        /**
 
70
         * Sets the coefficient of a AtomContainer to a given value.
 
71
         *
 
72
         * @param  container   The AtomContainer for which the multiplier is set
 
73
         * @param  multiplier  The new multiplier for the AtomContatiner
 
74
         * @return             true if multiplier has been set
 
75
         * @see                #getMultiplier(IAtomContainer)
 
76
         */
 
77
        public boolean setMultiplier(IAtomContainer container, double multiplier);
 
78
        
 
79
        /**
 
80
         * Sets the coefficient of a AtomContainer to a given value.
 
81
         *
 
82
         * @param  position    The position of the AtomContainer for which the multiplier is
 
83
         *                    set in [0,..]
 
84
         * @param  multiplier  The new multiplier for the AtomContatiner at
 
85
         *                    <code>position</code>
 
86
         * @see                #getMultiplier(int)
 
87
         */
 
88
        public void setMultiplier(int position, double multiplier);
 
89
 
 
90
        /**
 
91
         * Returns an array of double with the stoichiometric coefficients
 
92
         * of the products.
 
93
         *
 
94
         * @return    The multipliers for the AtomContainer's in this set
 
95
         * @see       #setMultipliers
 
96
         */
 
97
        public double[] getMultipliers();
 
98
 
 
99
        /**
 
100
         * Sets the multipliers of the AtomContainers.
 
101
         *
 
102
         * @param  newMultipliers  The new multipliers for the AtomContainers in this set
 
103
         * @return                 true if multipliers have been set.
 
104
         * @see                    #getMultipliers
 
105
         */
 
106
        public boolean setMultipliers(double[] newMultipliers);
 
107
        
 
108
        /**
 
109
         * Adds an atomContainer to this container with the given
 
110
         * multiplier.
 
111
         *
 
112
         * @param  atomContainer  The atomContainer to be added to this container
 
113
         * @param  multiplier     The multiplier of this atomContainer
 
114
         */
 
115
        public void addAtomContainer(IAtomContainer atomContainer, double multiplier);
 
116
 
 
117
        /**
 
118
         * Adds all atomContainers in the AtomContainerSet to this container.
 
119
         *
 
120
         * @param  atomContainerSet  The AtomContainerSet
 
121
         */
 
122
        public void add(IAtomContainerSet atomContainerSet);
 
123
        
 
124
        /**
 
125
         *  Get an iterator for this AtomContainerSet.
 
126
     * 
 
127
     * @return A new Iterator for this AtomContainerSet.
 
128
         */
 
129
        public java.util.Iterator atomContainers();
 
130
 
 
131
        /**
 
132
         * Returns the AtomContainer at position <code>number</code> in the
 
133
         * container.
 
134
         *
 
135
         * @param  number  The position of the AtomContainer to be returned.
 
136
         * @return         The AtomContainer at position <code>number</code> .
 
137
         */
 
138
        public IAtomContainer getAtomContainer(int number);
 
139
 
 
140
        /**
 
141
         * Returns the multiplier for the AtomContainer at position <code>number</code> in the
 
142
         * container.
 
143
         *
 
144
         * @param  number  The position of the multiplier of the AtomContainer to be returned.
 
145
         * @return         The multiplier for the AtomContainer at position <code>number</code> .
 
146
         * @see            #setMultiplier(int, double)
 
147
         */
 
148
        public double getMultiplier(int number);
 
149
 
 
150
        /**
 
151
         * Returns the multiplier of the given AtomContainer.
 
152
         *
 
153
         * @param  container  The AtomContainer for which the multiplier is given
 
154
         * @return            -1, if the given molecule is not a container in this set
 
155
         * @see               #setMultiplier(IAtomContainer, double)
 
156
         */
 
157
        public double getMultiplier(IAtomContainer container);
 
158
 
 
159
        /**
 
160
         * Returns the number of AtomContainers in this Container.
 
161
         *
 
162
         * @return    The number of AtomContainers in this Container
 
163
         */
 
164
        public int getAtomContainerCount();
 
165
 
 
166
}
 
167