| 1 |
package org.guha.rcdk.formula; |
| 2 |
|
| 3 |
import org.openscience.cdk.formula.rules.IRule; |
| 4 |
|
| 5 |
import java.util.ArrayList; |
| 6 |
import java.util.List; |
| 7 |
|
| 8 |
/** |
| 9 |
* @author Miguel rojas |
| 10 |
*/ |
| 11 |
public 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 |
} |