PageRenderTime 43ms CodeModel.GetById 17ms RepoModel.GetById 1ms 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
  1. package org.guha.rcdk.formula;
  2. import org.openscience.cdk.formula.rules.IRule;
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. /**
  6. * @author Miguel rojas
  7. */
  8. public class FormulaTools {
  9. /**
  10. * Initiate a List object
  11. *
  12. * @return A List with IRule object
  13. */
  14. public static List<IRule> createList() {
  15. List<IRule> rules = new ArrayList<IRule>();
  16. return rules;
  17. }
  18. /**
  19. * Add to a List a IRule object
  20. *
  21. * @param rules A List with IRule object
  22. * @param rule A IRule object to add
  23. * @return A List with IRule object
  24. */
  25. public static List<IRule> addTo(List<IRule> rules, IRule rule) {
  26. rules.add(rule);
  27. return rules;
  28. }
  29. }