001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 3.0.10
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011public class MathFilter extends ElementFilter {
012   private long swigCPtr;
013
014   protected MathFilter(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.MathFilter_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(MathFilter obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (MathFilter obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_MathFilter(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/** * @internal */ public
055 MathFilter() {
056    this(libsbmlJNI.new_MathFilter(), true);
057  }
058
059  
060/** * @internal */ public
061 boolean filter(SBase element) {
062    return libsbmlJNI.MathFilter_filter(swigCPtr, this, SBase.getCPtr(element), element);
063  }
064
065}