public static class ToNative.Simple
extends java.lang.Object
| Constructor and Description |
|---|
Simple() |
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
ByteBuffer(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence) |
static java.lang.String |
DafnyUtf8Bytes(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence)
Decode a
DafnySequence of UTF-8 Bytes into a String. |
static java.util.Date |
Date(dafny.DafnySequence<? extends java.lang.Character> dafnySequence)
Parse a
DafnySequence of Characters into a Date. |
static java.lang.Double |
Double(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence)
Deserialize the 8 Bytes from a
DafnySequence of Bytes
into a Double. |
static java.time.Instant |
Instant(dafny.DafnySequence<? extends java.lang.Character> dafnySequence)
Parse a
DafnySequence of Characters into a Instant. |
static java.lang.String |
String(dafny.DafnySequence<? extends java.lang.Character> dafnySequence) |
public static java.nio.ByteBuffer ByteBuffer(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence)
dafnySequence - The Dafny Runtime type for a blob is a DafnySequence of Bytes.ByteBuffer.ToDafny.Simple.ByteSequence(byte[])public static java.lang.String String(dafny.DafnySequence<? extends java.lang.Character> dafnySequence)
dafnySequence - The Dafny Runtime type for a String is A DafnySequence of Characters.String.ToDafny.Simple.CharacterSequence(java.lang.String)public static java.lang.Double Double(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence)
DafnySequence of Bytes
into a Double.At this time, Dafny does not have an idiomatic Double type in the language or any standard library.
As such, Doubles are represented as the serialized bytes of their Native Type.
Note: This serialization is NOT guaranteed to be consistent among different Dafny Runtimes or even native distributions.
dafnySequence - A DafnySequence of 8 BytesDouble.ToDafny.Simple.Double(java.lang.Double)public static java.util.Date Date(dafny.DafnySequence<? extends java.lang.Character> dafnySequence)
DafnySequence of Characters into a Date.At this time, Dafny does not have an idiomatic Timestamp or Date type in the language or any standard library.
Instead, the Timestamp is serialized as seconds from epoch, as a string.
dafnySequence - DafnySequence of Characters containing the serialization of the timestamp.Date.ToDafny.Simple.CharacterSequence(Date)public static java.time.Instant Instant(dafny.DafnySequence<? extends java.lang.Character> dafnySequence)
DafnySequence of Characters into a Instant.At this time, Dafny does not have an idiomatic Timestamp or Date type in the language or any standard library.
Instead, the Timestamp is serialized as seconds from epoch, as a string.
dafnySequence - DafnySequence of Characters containing the serialization of the timestamp.Instant.ToDafny.Simple.CharacterSequence(Instant)public static java.lang.String DafnyUtf8Bytes(dafny.DafnySequence<? extends java.lang.Byte> dafnySequence)
DafnySequence of UTF-8 Bytes into a String.dafnySequence - A DafnySequence of Bytes.StringToDafny.Simple.DafnyUtf8Bytes(String)