getModifier() public method

public getModifier ( long n ) : ModifierSpeciesReference
n long
return ModifierSpeciesReference
 public void test_SpeciesReference_Modifier_parent_create()
 {
     Reaction r = new Reaction(2,4);
       ModifierSpeciesReference sr = r.createModifier();
       ListOf lo = r.getListOfModifiers();
       assertTrue( lo == sr.getParentSBMLObject() );
       assertTrue( lo == r.getModifier(0).getParentSBMLObject() );
       assertTrue( r == lo.getParentSBMLObject() );
 }
Beispiel #2
0
 public void test_SpeciesReference_Modifier_ancestor_create()
 {
     Reaction r = new Reaction(2,4);
       ModifierSpeciesReference sr = r.createModifier();
       ListOf lo = r.getListOfModifiers();
       assertTrue( sr.getAncestorOfType(libsbml.SBML_REACTION) == r );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( sr.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
       ModifierSpeciesReference obj = r.getModifier(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
 }
 public void test_SpeciesReference_Modifier_parent_add()
 {
     ModifierSpeciesReference sr = new ModifierSpeciesReference(2,4);
       sr.setSpecies("s");
       Reaction r = new Reaction(2,4);
       r.addModifier(sr);
       sr = null;
       ListOf lo = r.getListOfModifiers();
       assertTrue( lo == r.getModifier(0).getParentSBMLObject() );
       assertTrue( r == lo.getParentSBMLObject() );
 }
Beispiel #4
0
 public void test_SpeciesReference_Modifier_ancestor_add()
 {
     ModifierSpeciesReference sr = new ModifierSpeciesReference(2,4);
       sr.setSpecies("s");
       Reaction r = new Reaction(2,4);
       r.addModifier(sr);
       sr = null;
       ListOf lo = r.getListOfModifiers();
       ModifierSpeciesReference obj = r.getModifier(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
 }