-
Notifications
You must be signed in to change notification settings - Fork 1
Home
jeffbrown edited this page Sep 13, 2010
·
13 revisions
The groovy-measures library aims to bring a DSL to groovy specifically for dealing with units of measure. For example, groovy-measures supports code like the following:
def distance = 9.meters + 34.centimeters
To use the groovy-measures library you must include the groovy-measures jar file in your application’s CLASSPATH and you must bootstrap the environment by loading the com.g2one.groovy.measures.GroovyMeasures class.
Class.forName 'com.g2one.groovy.measures.GroovyMeasures'
The library makes extensive use of JScience so the JScience jar file must also be on your application’s CLASSPATH.