ContactList

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

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

See also

Constructors

ContactList
Link copied to clipboard
fun ContactList()
ContactList
Link copied to clipboard
fun <out C : Contact> ContactList(delegate: MutableCollection<@UnsafeVariance C>)

Functions

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

operator fun contains(id: Long): Boolean

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

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

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

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

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

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

删除 Contact.idid 的元素.

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

Properties

delegate
Link copied to clipboard
val delegate: MutableCollection<@UnsafeVariance C>
size
Link copied to clipboard
open override val size: Int