
org.jcamp.spectrum.notes.UnitParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jcamp-dx Show documentation
Show all versions of jcamp-dx Show documentation
The JCAMP-DX project is the reference implemention of the IUPAC JCAMP-DX spectroscopy data standard.
package org.jcamp.spectrum.notes;
import org.jcamp.units.Unit;
/**
* parser for units.
* @author Thomas Weber
*/
public class UnitParser implements INoteContentParser {
/**
* UnitParser constructor comment.
*/
public UnitParser() {
super();
}
/**
* parse the note content.
* @return java.lang.Object
* @param content java.lang.String
* @param resultClass java.lang.Class
*/
public Object parseContent(String content, Class resultClass) {
if (Unit.class.isAssignableFrom(resultClass))
return Unit.getUnitFromString(content);
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy