mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-23 10:35:18 +01:00
Float support for StoredData.
This commit is contained in:
parent
e7340bbc89
commit
a507cffbca
@ -7,9 +7,6 @@ import com.craftaro.core.data.connector.MariaDBConnector;
|
|||||||
import com.craftaro.core.data.connector.MySQLConnector;
|
import com.craftaro.core.data.connector.MySQLConnector;
|
||||||
import com.craftaro.core.data.connector.SQLiteConnector;
|
import com.craftaro.core.data.connector.SQLiteConnector;
|
||||||
import com.craftaro.core.thread.MonitoredThread;
|
import com.craftaro.core.thread.MonitoredThread;
|
||||||
import org.jooq.DSLContext;
|
|
||||||
import org.jooq.SQLDialect;
|
|
||||||
import org.jooq.impl.DSL;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
@ -42,6 +42,10 @@ public class StoredData {
|
|||||||
return Long.parseLong(string);
|
return Long.parseLong(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float asFloat() {
|
||||||
|
return Float.parseFloat(asString());
|
||||||
|
}
|
||||||
|
|
||||||
public Instant asInstant() {
|
public Instant asInstant() {
|
||||||
return Instant.ofEpochMilli(asLong());
|
return Instant.ofEpochMilli(asLong());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user