PageRenderTime 15ms CodeModel.GetById 9ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/rcdkjar/src/org/guha/rcdk/formula/FormulaTools.java

http://github.com/rajarshi/cdkr
Java | 36 lines | 14 code | 7 blank | 15 comment | 0 complexity | 1a83f294702abb1fd297d5b1f5d0de30 MD5 | raw file
 1package org.guha.rcdk.formula;
 2
 3import org.openscience.cdk.formula.rules.IRule;
 4
 5import java.util.ArrayList;
 6import java.util.List;
 7
 8/**
 9 * @author Miguel rojas
10 */
11public class FormulaTools {
12
13    /**
14     * Initiate a List object
15     *
16     * @return A List with IRule object
17     */
18    public static List<IRule> createList() {
19        List<IRule> rules = new ArrayList<IRule>();
20        return rules;
21    }
22
23    /**
24     * Add to a List a IRule object
25     *
26     * @param rules A List with IRule object
27     * @param rule  A IRule object to add
28     * @return A List with IRule object
29     */
30    public static List<IRule> addTo(List<IRule> rules, IRule rule) {
31        rules.add(rule);
32        return rules;
33    }
34
35
36}