ContactList

class ContactList<out C : Contact> @MiraiInternalApi constructor(val delegate: MutableCollection<@UnsafeVariance C>) : Collection<C>

只读联系人列表. 元素列表仍可能会被 mirai 内部修改.

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open operator override fun contains(element: C): Boolean

operator fun contains(id: Long): Boolean

当存在 Contact.idid 的元素时返回 true.

Link copied to clipboard
open override fun containsAll(elements: Collection<C>): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun get(id: Long): C?

获取一个 Contact.idid 的元素. 在不存在时返回 null.

Link copied to clipboard
fun getOrFail(id: Long): C

获取一个 Contact.idid 的元素. 在不存在时抛出 NoSuchElementException.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<C>
Link copied to clipboard
fun remove(id: Long): Boolean

删除 Contact.idid 的元素.

Link copied to clipboard

转换得到 mirai 码.

Link copied to clipboard
Link copied to clipboard

扁平化 this 并创建一个 MessageChain.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open override val size: Int