convert interfaces to kotlin
This commit is contained in:
parent
4a512841fd
commit
a7f1758104
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.setupwizard;
|
||||
|
||||
// keep in java, it's easier
|
||||
public interface SWNumberValidator {
|
||||
boolean isValid(double value);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.setupwizard;
|
||||
|
||||
// keep in java, it's easier
|
||||
public interface SWTextValidator {
|
||||
boolean isValid(String text);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.setupwizard;
|
||||
|
||||
// keep in java, it's easier
|
||||
public interface SWValidator {
|
||||
boolean isValid();
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
package info.nightscout.androidaps.db;
|
||||
|
||||
public interface DbObjectBase {
|
||||
|
||||
long getDate();
|
||||
|
||||
long getPumpId();
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package info.nightscout.androidaps.db
|
||||
|
||||
interface DbObjectBase {
|
||||
|
||||
val date: Long
|
||||
val pumpId: Long
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -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> {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue