62 public abstract ArrayList<LocationPoint>
getPoints();
64 private static final class CppProxy
extends RoutePath
66 private final long nativeRef;
67 private final AtomicBoolean destroyed =
new AtomicBoolean(
false);
69 private CppProxy(
long nativeRef)
71 if (nativeRef == 0)
throw new RuntimeException(
"nativeRef is zero");
72 this.nativeRef = nativeRef;
75 private native
void nativeDestroy(
long nativeRef);
76 public void _djinni_private_destroy()
78 boolean destroyed = this.destroyed.getAndSet(
true);
79 if (!destroyed) nativeDestroy(this.nativeRef);
81 protected void finalize() throws
java.lang.Throwable
83 _djinni_private_destroy();
92 assert !this.destroyed.get() :
"trying to use a destroyed object";
93 return native_head(this.nativeRef, advance);
95 private native
RoutePath native_head(
long _nativeRef,
float advance);
100 assert !this.destroyed.get() :
"trying to use a destroyed object";
101 return native_tail(this.nativeRef, advance);
103 private native
RoutePath native_tail(
long _nativeRef,
float advance);
106 public float getLength()
108 assert !this.destroyed.get() :
"trying to use a destroyed object";
109 return native_getLength(this.nativeRef);
111 private native
float native_getLength(
long _nativeRef);
114 public ArrayList<RouteEvent> getEvents()
116 assert !this.destroyed.get() :
"trying to use a destroyed object";
117 return native_getEvents(this.nativeRef);
119 private native ArrayList<RouteEvent> native_getEvents(
long _nativeRef);
122 public ArrayList<LocationPoint> getPoints()
124 assert !this.destroyed.get() :
"trying to use a destroyed object";
125 return native_getPoints(this.nativeRef);
127 private native ArrayList<LocationPoint> native_getPoints(
long _nativeRef);