Change EmptyCursor to Kotlin
This commit is contained in:
parent
0d19bcee9a
commit
dd5d550c58
1 changed files with 14 additions and 42 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue