mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Fix typos
This commit is contained in:
parent
537c21452d
commit
7196ee6a12
@ -61,6 +61,7 @@ inline fun <R> Contact.withSession(block: BotSession.() -> R): R {
|
|||||||
* 只读联系人列表, lockfree 实现
|
* 只读联系人列表, lockfree 实现
|
||||||
*/
|
*/
|
||||||
@UseExperimental(MiraiInternalAPI::class)
|
@UseExperimental(MiraiInternalAPI::class)
|
||||||
|
@Suppress("unused")
|
||||||
class ContactList<C : Contact>(@PublishedApi internal val delegate: MutableContactList<C>) {
|
class ContactList<C : Contact>(@PublishedApi internal val delegate: MutableContactList<C>) {
|
||||||
/**
|
/**
|
||||||
* ID 列表的字符串表示.
|
* ID 列表的字符串表示.
|
||||||
@ -71,7 +72,7 @@ class ContactList<C : Contact>(@PublishedApi internal val delegate: MutableConta
|
|||||||
*/
|
*/
|
||||||
val idContentString: String get() = "[" + buildString { delegate.forEach { append(it.id).append(", ") } }.dropLast(2) + "]"
|
val idContentString: String get() = "[" + buildString { delegate.forEach { append(it.id).append(", ") } }.dropLast(2) + "]"
|
||||||
|
|
||||||
operator fun get(id: UInt): C = delegate.get(id)
|
operator fun get(id: UInt): C = delegate[id]
|
||||||
fun getOrNull(id: UInt): C? = delegate.getOrNull(id)
|
fun getOrNull(id: UInt): C? = delegate.getOrNull(id)
|
||||||
fun containsId(id: UInt): Boolean = delegate.getOrNull(id) != null
|
fun containsId(id: UInt): Boolean = delegate.getOrNull(id) != null
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ class ContactList<C : Contact>(@PublishedApi internal val delegate: MutableConta
|
|||||||
* 可修改联系人列表. 只会在内部使用.
|
* 可修改联系人列表. 只会在内部使用.
|
||||||
*/
|
*/
|
||||||
@MiraiInternalAPI
|
@MiraiInternalAPI
|
||||||
class MutableContactList<C : Contact>() : LockFreeLinkedList<C>() {
|
class MutableContactList<C : Contact> : LockFreeLinkedList<C>() {
|
||||||
override fun toString(): String = joinToString(separator = ", ", prefix = "MutableContactList(", postfix = ")")
|
override fun toString(): String = joinToString(separator = ", ", prefix = "MutableContactList(", postfix = ")")
|
||||||
|
|
||||||
operator fun get(id: UInt): C {
|
operator fun get(id: UInt): C {
|
||||||
|
Loading…
Reference in New Issue
Block a user