Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 403 Bytes

README.md

File metadata and controls

20 lines (17 loc) · 403 Bytes

Molecular formula parser

Simple molecular formula parser for Java 8

Install

<dependency>
  <groupId>io.github.nomeyho</groupId>
  <artifactId>molecular-formula-parser</artifactId>
  <version>1.0.3</version>
</dependency>

Usage

FormulaParser parser = new FormulaParser("H20");
Map<Element, Integer> atoms = parser.parse();

atoms.get(Element.H); // 2
atoms.get(Element.0); // 1