Skip to content

Commit

Permalink
docs(common-enums): add Dokka docs for impl sub-package
Browse files Browse the repository at this point in the history
  • Loading branch information
EdricChan03 committed May 10, 2024
1 parent d82c4e1 commit 7ae3209
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions androidx/common/common-enums/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,21 @@ enum class Example(val value: String) {
}
}
```

# Package io.github.edricchan03.androidx.common.enums.impl

Implementations of utilities from the parent package, such as
[`ValueEnumFromValue`][io.github.edricchan03.androidx.common.enums.impl.ValueEnumFromValue]:

```kotlin
enum class ExampleValue(override val value: String): ValueEnum<String> {
One("one"),
Two("two"),
Three("three");

companion object : ValueEnumFromValue<String, ExampleValue>(default = One, entries)
}

println(ExampleValue.fromValueOrNull("four")) // null
println(ExampleValue.fromValueOrNull("one")) // One
```

0 comments on commit 7ae3209

Please sign in to comment.