Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / bindings / java / org / simgrid / surf / NetworkAction.java
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.11
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8
9 package org.simgrid.surf;
10
11 /**
12   * An network action created by network model
13   * @see NetworkLink
14   */
15 public class NetworkAction extends Action {
16   private long swigCPtr;
17
18   protected NetworkAction(long cPtr, boolean cMemoryOwn) {
19     super(SurfJNI.NetworkAction_SWIGUpcast(cPtr), cMemoryOwn);
20     swigCPtr = cPtr;
21   }
22
23   protected static long getCPtr(NetworkAction obj) {
24     return (obj == null) ? 0 : obj.swigCPtr;
25   }
26
27   protected void finalize() {
28     delete();
29   }
30
31   public synchronized void delete() {
32     if (swigCPtr != 0) {
33       if (swigCMemOwn) {
34         swigCMemOwn = false;
35         SurfJNI.delete_NetworkAction(swigCPtr);
36       }
37       swigCPtr = 0;
38     }
39     super.delete();
40   }
41
42   
43   /**
44     * @return The latency of the action
45     */
46   public double getLatency() {
47     return SurfJNI.NetworkAction_getLatency(swigCPtr, this);
48   }
49
50 }