refactor(automator): 转换为kotlin
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion versions.compile
|
||||
@@ -27,6 +29,7 @@ dependencies {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation 'junit:junit:4.12'
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
api 'com.android.support:support-annotations:28.0.0'
|
||||
api 'com.github.hyb1996:settingscompat:1.1.5'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.stardust.util;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.util.SparseArray;
|
||||
|
||||
/**
|
||||
@@ -8,13 +9,14 @@ import android.util.SparseArray;
|
||||
|
||||
public class SparseArrayEntries<E> {
|
||||
|
||||
private SparseArray<E> mSparseArray = new SparseArray<>();
|
||||
private final SparseArray<E> mSparseArray = new SparseArray<>();
|
||||
|
||||
public SparseArrayEntries<E> entry(int key, E value) {
|
||||
mSparseArray.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public SparseArray<E> sparseArray() {
|
||||
return mSparseArray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user