getMultiplier() public method

public getMultiplier ( ) : double
return double
Esempio n. 1
0
 public void test_Unit_setMultiplier2()
 {
     Unit c = new  Unit(2,2);
       int i = c.setMultiplier(4);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getMultiplier() == 4 );
       c = null;
 }
Esempio n. 2
0
 public void test_L3_Unit_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Unit u = new  Unit(sbmlns);
       assertTrue( u.getTypeCode() == libsbml.SBML_UNIT );
       assertTrue( u.getMetaId() == "" );
       assertTrue( u.getNotes() == null );
       assertTrue( u.getAnnotation() == null );
       assertTrue( u.getLevel() == 3 );
       assertTrue( u.getVersion() == 1 );
       assertTrue( u.getNamespaces() != null );
       assertTrue( u.getNamespaces().getLength() == 2 );
       assertTrue( u.getKind() == libsbml.UNIT_KIND_INVALID );
       assertEquals( true, isnan(u.getExponentAsDouble()) );
       assertEquals( true, isnan(u.getMultiplier()) );
       assertEquals( false, u.isSetKind() );
       assertEquals( false, u.isSetExponent() );
       assertEquals( false, u.isSetMultiplier() );
       assertEquals( false, u.isSetScale() );
       u = null;
 }
Esempio n. 3
0
 public void test_Unit_set_get()
 {
     Unit u = new  Unit(2,4);
       assertTrue( u.getKind() == libsbml.UNIT_KIND_INVALID );
       assertTrue( u.getExponent() == 1 );
       assertTrue( u.getScale() == 0 );
       assertTrue( u.getMultiplier() == 1.0 );
       assertEquals( false, u.isSetKind() );
       u.setKind(libsbml.UNIT_KIND_WATT);
       assertTrue( u.getKind() == libsbml.UNIT_KIND_WATT );
       u.setExponent(3);
       assertTrue( u.getExponent() == 3 );
       u.setScale(4);
       assertTrue( u.getScale() == 4 );
       u.setMultiplier(3.2);
       assertTrue( u.getMultiplier() == 3.2 );
       u = null;
 }