
com.google.protobuf.ExtendableMessageLiteExtensions.kt Maven / Gradle / Ivy
package com.google.protobuf.kotlin
import com.google.protobuf.ExtensionLite
import com.google.protobuf.GeneratedMessageLite
/** Gets the value of the proto extension. */
operator fun <
M : GeneratedMessageLite.ExtendableMessage,
MOrBT : GeneratedMessageLite.ExtendableMessageOrBuilder,
T : Any
> MOrBT.get(extension: ExtensionLite): T = getExtension(extension)
/** Sets the current value of the proto extension in this builder. */
operator fun <
M : GeneratedMessageLite.ExtendableMessage,
B : GeneratedMessageLite.ExtendableBuilder,
T : Any
> B.set(extension: ExtensionLite, value: T) {
setExtension(extension, value)
}
/** Returns true if the specified extension is set. */
operator fun <
M : GeneratedMessageLite.ExtendableMessage,
MorBT : GeneratedMessageLite.ExtendableMessageOrBuilder
> MorBT.contains(
extension: ExtensionLite
): Boolean = hasExtension(extension)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy