Last active
February 6, 2019 06:44
-
-
Save CesarValiente/ded40c351bf3ae0af75e392d58cac91f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class Color { | |
RED, YELLOW, GREEN, BLUE, WHITE | |
} | |
data class Item( | |
val localId: String = generateLocalId(), | |
val text: String? = null, | |
val favorite: Boolean = false, | |
val color: Color = Color.WHITE, | |
val position: Long = object : PositionsFactory {}.newPosition()) { | |
fun isEmpty(): Boolean = text == null | |
fun isNotEmpty(): Boolean = !isEmpty() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment