Skip to content

Commit

Permalink
Change property to method for checking type
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode committed Oct 13, 2023
1 parent 93c297b commit bcb07ce
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ParsedMessage private constructor(

interface Builder<out T : Builder<T>> : Message.Builder<T> {
val type: String
val isTypeSet: Boolean
fun isTypeSet(): Boolean

fun setType(type: String): T
override fun build(): ParsedMessage
Expand Down Expand Up @@ -196,8 +196,8 @@ private sealed class BaseParsedBuilder<out T : ParsedMessage.Builder<T>> : Parse
get() = requireNotNull(this._type) {
"Property \"type\" has not been set"
}
override val isTypeSet: Boolean
get() = _type != null

override fun isTypeSet(): Boolean = _type != null

override fun setId(id: MessageId): T = self {
require(idBuilder == null) {
Expand Down

0 comments on commit bcb07ce

Please sign in to comment.