66 public abstract ArrayList<RouteNode>
nodes();
98 private static final class CppProxy
extends RoutePath
100 private final long nativeRef;
101 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
103 private CppProxy(
long nativeRef)
105 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
106 this.nativeRef = nativeRef;
109 private native
void nativeDestroy(
long nativeRef);
110 public void _djinni_private_destroy()
112 boolean destroyed = this.destroyed.getAndSet(
true);
113 if (!destroyed) nativeDestroy(this.nativeRef);
115 protected void finalize() throws
java.lang.Throwable
117 _djinni_private_destroy();
126 assert !this.destroyed.get() :
"trying to use a destroyed object";
127 return native_head(this.nativeRef, advance);
129 private native
RoutePath native_head(
long _nativeRef,
float advance);
134 assert !this.destroyed.get() :
"trying to use a destroyed object";
135 return native_tail(this.nativeRef, advance);
137 private native
RoutePath native_tail(
long _nativeRef,
float advance);
140 public ArrayList<RouteNode> nodes()
142 assert !this.destroyed.get() :
"trying to use a destroyed object";
143 return native_nodes(this.nativeRef);
145 private native ArrayList<RouteNode> native_nodes(
long _nativeRef);
148 public float getLength()
150 assert !this.destroyed.get() :
"trying to use a destroyed object";
151 return native_getLength(this.nativeRef);
153 private native
float native_getLength(
long _nativeRef);
156 public float getWeight()
158 assert !this.destroyed.get() :
"trying to use a destroyed object";
159 return native_getWeight(this.nativeRef);
161 private native
float native_getWeight(
long _nativeRef);