Float support for StoredData.

This commit is contained in:
Brianna O'Keefe 2024-03-23 18:56:58 -05:00
parent e7340bbc89
commit a507cffbca
2 changed files with 4 additions and 3 deletions

View File

@ -7,9 +7,6 @@ import com.craftaro.core.data.connector.MariaDBConnector;
import com.craftaro.core.data.connector.MySQLConnector;
import com.craftaro.core.data.connector.SQLiteConnector;
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.util.concurrent.TimeUnit;

View File

@ -42,6 +42,10 @@ public class StoredData {
return Long.parseLong(string);
}
public float asFloat() {
return Float.parseFloat(asString());
}
public Instant asInstant() {
return Instant.ofEpochMilli(asLong());
}