isSetValue() public method

public isSetValue ( ) : bool
return bool
 public void test_Parameter_setValue2()
 {
     Parameter p = new  Parameter(2,2);
       int i = p.unsetValue();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, p.isSetValue() );
       p = null;
 }
Beispiel #2
0
 public void test_L3_Parameter_createWithNS()
 {
     XMLNamespaces xmlns = new  XMLNamespaces();
       xmlns.add( "http://www.sbml.org", "testsbml");
       SBMLNamespaces sbmlns = new  SBMLNamespaces(3,1);
       sbmlns.addNamespaces(xmlns);
       Parameter p = new  Parameter(sbmlns);
       assertTrue( p.getTypeCode() == libsbml.SBML_PARAMETER );
       assertTrue( p.getMetaId() == "" );
       assertTrue( p.getNotes() == null );
       assertTrue( p.getAnnotation() == null );
       assertTrue( p.getLevel() == 3 );
       assertTrue( p.getVersion() == 1 );
       assertTrue( p.getNamespaces() != null );
       assertTrue( p.getNamespaces().getLength() == 2 );
       assertTrue( p.getId() == "" );
       assertTrue( p.getName() == "" );
       assertTrue( p.getUnits() == "" );
       assertEquals( true, isnan(p.getValue()) );
       assertTrue( p.getConstant() == true );
       assertEquals( false, p.isSetId() );
       assertEquals( false, p.isSetName() );
       assertEquals( false, p.isSetValue() );
       assertEquals( false, p.isSetUnits() );
       assertEquals( false, p.isSetConstant() );
       p = null;
 }
Beispiel #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="aParameter"></param>
 /// <returns></returns>
 public static double GetParameterValue(Parameter aParameter)
 {
     double aValue_Pa;
     if (aParameter.isSetValue())
         aValue_Pa = aParameter.getValue();
     else
         aValue_Pa = double.NaN;
     return aValue_Pa;
 }