Change EmptyCursor to Kotlin

This commit is contained in:
Wolf Montwé 2023-02-28 18:24:44 +01:00
parent 0d19bcee9a
commit dd5d550c58
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72

View file

@ -1,54 +1,26 @@
package com.fsck.k9.helper;
import android.database.AbstractCursor;
package com.fsck.k9.helper
import android.database.AbstractCursor
/**
* A dummy class that provides a empty cursor
* A dummy class that provides an empty cursor
*/
public class EmptyCursor extends AbstractCursor {
@Override
public int getCount() {
return 0;
}
class EmptyCursor : AbstractCursor() {
override fun getCount() = 0
@Override
public String[] getColumnNames() {
return new String[0];
}
override fun getColumnNames() = arrayOf<String>()
@Override
public String getString(int column) {
return null;
}
override fun getString(column: Int) = null
@Override
public short getShort(int column) {
return 0;
}
override fun getShort(column: Int): Short = 0
@Override
public int getInt(int column) {
return 0;
}
override fun getInt(column: Int) = 0
@Override
public long getLong(int column) {
return 0;
}
override fun getLong(column: Int): Long = 0
@Override
public float getFloat(int column) {
return 0;
}
override fun getFloat(column: Int) = 0f
@Override
public double getDouble(int column) {
return 0;
}
override fun getDouble(column: Int) = 0.0
@Override
public boolean isNull(int column) {
return false;
}
}
override fun isNull(column: Int) = true
}