
com.google.protobuf.ExtensionList.kt Maven / Gradle / Ivy
package com.google.protobuf.kotlin
import com.google.protobuf.ExtensionLite
import com.google.protobuf.MessageLite
/**
* Implementation for ExtensionList and ExtensionListLite. Like [DslList], represents an
* unmodifiable view of a repeated proto field -- in this case, an extension field -- but
* supports querying the extension.
*/
class ExtensionList @OnlyForUseByGeneratedProtoCode constructor(
val extension: ExtensionLite>,
@JvmField private val delegate: List
) : List by delegate {
override fun iterator(): Iterator = UnmodifiableIterator(delegate.iterator())
override fun listIterator(): ListIterator = UnmodifiableListIterator(delegate.listIterator())
override fun listIterator(index: Int): ListIterator =
UnmodifiableListIterator(delegate.listIterator(index))
override fun equals(other: Any?): Boolean = delegate == other
override fun hashCode(): Int = delegate.hashCode()
override fun toString(): String = delegate.toString()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy