Newer
Older
MonCalc / app / src / main / kotlin / jackall / moncalc / viewmodel / FruitAnalyzeItemViewModel.kt
KeijuMatsumoto on 5 Nov 2017 528 bytes [add] sort items
package jackall.moncalc.viewmodel

import android.arch.lifecycle.ViewModel

/**
 * Created by matsumoto_k on 2017/11/05.
 */
class FruitAnalyzeItemViewModel(
        var fruitName: String = "",
        var grade0: String = "",
        var grade1: String = "",
        var grade2: String = "",
        var grade3: String = "",
        var grade4: String = "",
        var grade5: String = ""
) : ViewModel() {
    fun count() = grade0.toInt() + grade1.toInt() + grade2.toInt() + grade3.toInt() + grade4.toInt() + grade5.toInt()
}