convert interfaces to kotlin

This commit is contained in:
Milos Kozak 2021-02-25 18:42:36 +01:00
parent 4a512841fd
commit a7f1758104
9 changed files with 22 additions and 23 deletions

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.setupwizard;
// keep in java, it's easier
public interface SWNumberValidator {
boolean isValid(double value);
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.setupwizard;
// keep in java, it's easier
public interface SWTextValidator {
boolean isValid(String text);
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.setupwizard;
// keep in java, it's easier
public interface SWValidator {
boolean isValid();
}

View file

@ -1,9 +0,0 @@
package info.nightscout.androidaps.db;
public interface DbObjectBase {
long getDate();
long getPumpId();
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.db
interface DbObjectBase {
val date: Long
val pumpId: Long
}

View file

@ -1,13 +0,0 @@
package info.nightscout.androidaps.interfaces;
import info.nightscout.androidaps.data.PumpEnactResult;
/**
* Created by mike on 12.06.2017.
*/
public interface DanaRInterface {
PumpEnactResult loadHistory(byte type); // for history browser
PumpEnactResult loadEvents(); // events history to build treatments from
PumpEnactResult setUserOptions(); // like AnyDana does
}

View file

@ -0,0 +1,10 @@
package info.nightscout.androidaps.interfaces
import info.nightscout.androidaps.data.PumpEnactResult
interface DanaRInterface {
fun loadHistory(type: Byte): PumpEnactResult // for history browser
fun loadEvents(): PumpEnactResult // events history to build treatments from
fun setUserOptions(): PumpEnactResult // like AnyDana does
}

View file

@ -6,6 +6,7 @@ import info.nightscout.androidaps.database.daos.TraceableDao;
import info.nightscout.androidaps.database.daos.TraceableDaoKt;
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry;
// keep in java, it's easier
public interface TraceableDaoWorkaround<T extends TraceableDBEntry> {
/**

View file

@ -7,7 +7,7 @@ interface TraceableDBEntry: DBEntry {
var dateCreated: Long
var isValid: Boolean
var referenceId: Long?
var interfaceIDs_backing: InterfaceIDs?
@Suppress("PropertyName") var interfaceIDs_backing: InterfaceIDs?
val historic: Boolean get() = referenceId != null