com.lightstreamer.kotlin.socket.diff.SupportedDiff.kt Maven / Gradle / Ivy
The newest version!
package com.lightstreamer.kotlin.socket.diff
public enum class SupportedDiff(public val code: Char) {
JSONPatch('P'), TLCPDiff('T');
public companion object {
public fun fromCode(code: Char): SupportedDiff =
when (code) {
'P' -> JSONPatch
'T' -> TLCPDiff
else -> throw IllegalArgumentException("Diff not found: '$code'")
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy