Debian Codegraph @

jna-inchi-api/src/main/java/io/github/dan2097/jnainchi/InchiInput.java

raw
1 /**
2 * JNA-InChI - Library for calling InChI from Java
3 * Copyright © 2018 Daniel Lowe
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 package io.github.dan2097.jnainchi;
19
20 import java.util.ArrayList;
21 import java.util.Collections;
22 import java.util.List;
23
24 public class InchiInput {
25
26 private List<InchiAtom> atoms = new ArrayList<>();
27 private List<InchiBond> bonds = new ArrayList<>();
28 private List<InchiStereo> stereos = new ArrayList<>();
29
30 public void addAtom(InchiAtom atom) {
31 this.atoms.add(atom);
32 }
33
34 public void addBond(InchiBond bond) {
35 this.bonds.add(bond);
36 }
37
38 public void addStereo(InchiStereo stereo) {
39 this.stereos.add(stereo);
40 }
41
42 public InchiAtom getAtom(int i) {
43 return atoms.get(i);
44 }
45
46 public InchiBond getBond(int i) {
47 return bonds.get(i);
48 }
49
50 public List<InchiAtom> getAtoms() {
51 return Collections.unmodifiableList(atoms);
52 }
53
54 public List<InchiBond> getBonds() {
55 return Collections.unmodifiableList(bonds);
56 }
57
58 public List<InchiStereo> getStereos() {
59 return Collections.unmodifiableList(stereos);
60 }
61
62 }