source: trunk/lang/java/Units.java @ 1737

Last change on this file since 1737 was 1732, checked in by gah, 14 years ago
File size: 897 bytes
Line 
1/*
2 * ======================================================================
3 *  AUTHOR:  Ben Rafferty, Purdue University
4 *  Copyright (c) 2010  Purdue Research Foundation
5 *
6 *  See the file "license.terms" for information on usage and
7 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
8 * ======================================================================
9 */
10
11/*
12 * This file defines a java class that implemements the rappture units module.
13 * The class methods call the corresponding native code through c++ glue code
14 * located in jRpUnits.cc.
15 */
16
17
18package rappture;
19
20public class Units{
21  static {
22    System.loadLibrary("JRappture");
23  }
24
25  public static String convert(String fromVal, String to, boolean units){
26    return jRpUnitsConvert(fromVal, to, units);
27  }
28
29  private static native String jRpUnitsConvert(String fromVal, String to, boolean units);
30}
31
32
33
Note: See TracBrowser for help on using the repository browser.