MCPcopy Create free account
hub / github.com/LutrisEng/datom-rs / Fact

Class Fact

datom-java/lib/src/main/java/engineering/lutris/datom/Fact.java:7–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5package engineering.lutris.datom;
6
7public class Fact implements AutoCloseable {
8 private static class JNI {
9 static {
10 DatomJNI.ensureLoaded();
11 }
12
13 private static native long fromEdn(String edn);
14
15 private static native void destroy(long fact);
16
17 private static native String toEdn(long fact);
18 }
19
20 private long impl = 0;
21
22 private Fact(long impl) {
23 this.impl = impl;
24 }
25
26 public static Fact fromEdn(String edn) {
27 return new Fact(JNI.fromEdn(edn));
28 }
29
30 public String toEdn() {
31 return JNI.toEdn(this.impl);
32 }
33
34 @Override
35 public void close() {
36 JNI.destroy(impl);
37 }
38}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected