1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * Do not make changes to this file unless you know what you are doing--modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
9 package org.simgrid.surf;
11 public class NetworkLink extends Resource {
12 private long swigCPtr;
14 protected NetworkLink(long cPtr, boolean cMemoryOwn) {
15 super(SurfJNI.NetworkLink_SWIGUpcast(cPtr), cMemoryOwn);
19 protected static long getCPtr(NetworkLink obj) {
20 return (obj == null) ? 0 : obj.swigCPtr;
23 protected void finalize() {
27 public synchronized void delete() {
31 SurfJNI.delete_NetworkLink(swigCPtr);
38 protected static long[] cArrayUnwrap(NetworkLink[] arrayWrapper) {
39 long[] cArray = new long[arrayWrapper.length];
40 for (int i=0; i<arrayWrapper.length; i++)
41 cArray[i] = NetworkLink.getCPtr(arrayWrapper[i]);
45 protected static NetworkLink[] cArrayWrap(long[] cArray, boolean cMemoryOwn) {
46 NetworkLink[] arrayWrapper = new NetworkLink[cArray.length];
47 for (int i=0; i<cArray.length; i++)
48 arrayWrapper[i] = new NetworkLink(cArray[i], cMemoryOwn);
52 public double getBandwidth() {
53 return SurfJNI.NetworkLink_getBandwidth(swigCPtr, this);
56 public void updateBandwidth(double value, double date) {
57 SurfJNI.NetworkLink_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
60 public void updateBandwidth(double value) {
61 SurfJNI.NetworkLink_updateBandwidth__SWIG_1(swigCPtr, this, value);
64 public double getLatency() {
65 return SurfJNI.NetworkLink_getLatency(swigCPtr, this);
68 public void updateLatency(double value, double date) {
69 SurfJNI.NetworkLink_updateLatency__SWIG_0(swigCPtr, this, value, date);
72 public void updateLatency(double value) {
73 SurfJNI.NetworkLink_updateLatency__SWIG_1(swigCPtr, this, value);