mirai-core / net.mamoe.mirai.contact / ContactList

ContactList

class ContactList<C : Contact> : Iterable<C>

只读联系人列表, 无锁链表实现

See Also

ContactList.asSequence

Constructors

<init>

只读联系人列表, 无锁链表实现

ContactList(delegate: LockFreeLinkedList<C>)

Properties

_idContentString

val _idContentString: String

delegate

val delegate: LockFreeLinkedList<C>

size

val size: Int

Functions

contains

operator fun contains(element: C): Boolean
operator fun contains(id: Long): Boolean

containsAll

fun containsAll(elements: Collection<C>): Boolean

first

fun first(): C

firstOrNull

fun firstOrNull(): C?

forEach

fun forEach(block: (C) -> Unit): Unit

get

operator fun get(id: Long): C

getOrNull

fun getOrNull(id: Long): C?

isEmpty

fun isEmpty(): Boolean

iterator

fun iterator(): Iterator<C>

toString

fun toString(): String

Extension Properties

idContentString

ID 列表的字符串表示. 如:

val ContactList<*>.idContentString: String

Extension Functions

asSequence

fun <E : Contact> ContactList<E>.asSequence(): Sequence<E>

toList

fun <E : Contact> ContactList<E>.toList(): List<E>

toMutableList

fun <E : Contact> ContactList<E>.toMutableList(): MutableList<E>

toMutableSet

fun <E : Contact> ContactList<E>.toMutableSet(): MutableSet<E>

toSet

fun <E : Contact> ContactList<E>.toSet(): Set<E>