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 Link extends Resource {
12 private long swigCPtr;
14 protected Link(long cPtr, boolean cMemoryOwn) {
15 super(SurfJNI.Link_SWIGUpcast(cPtr), cMemoryOwn);
19 protected static long getCPtr(Link obj) {
20 return (obj == null) ? 0 : obj.swigCPtr;
23 protected void finalize() {
27 public synchronized void delete() {
31 SurfJNI.delete_Link(swigCPtr);
38 protected static long[] cArrayUnwrap(Link[] arrayWrapper) {
39 long[] cArray = new long[arrayWrapper.length];
40 for (int i=0; i<arrayWrapper.length; i++)
41 cArray[i] = Link.getCPtr(arrayWrapper[i]);
45 protected static Link[] cArrayWrap(long[] cArray, boolean cMemoryOwn) {
46 Link[] arrayWrapper = new Link[cArray.length];
47 for (int i=0; i<cArray.length; i++)
48 arrayWrapper[i] = new Link(cArray[i], cMemoryOwn);
52 public double getBandwidth() {
53 return SurfJNI.Link_getBandwidth(swigCPtr, this);
56 public void updateBandwidth(double value, double date) {
57 SurfJNI.Link_updateBandwidth__SWIG_0(swigCPtr, this, value, date);
60 public void updateBandwidth(double value) {
61 SurfJNI.Link_updateBandwidth__SWIG_1(swigCPtr, this, value);
64 public double getLatency() {
65 return SurfJNI.Link_getLatency(swigCPtr, this);
68 public void updateLatency(double value, double date) {
69 SurfJNI.Link_updateLatency__SWIG_0(swigCPtr, this, value, date);
72 public void updateLatency(double value) {
73 SurfJNI.Link_updateLatency__SWIG_1(swigCPtr, this, value);
76 public XbtDict getProperties() {
77 long cPtr = SurfJNI.Link_getProperties(swigCPtr, this);
78 return (cPtr == 0) ? null : new XbtDict(cPtr, false);