package io.rtron.io.messages

Classes

Name Description
class ContextMessageList<V> : Any
data class DefaultMessage: Any

Single message.

class DefaultMessageList
class MessageList<T> : Any
enum class Severity: Enum<Severity>

Typealiases

Name Description
typealias DefaultMessageList = MessageList

Methods

getNumberOfMessages

fun DefaultMessageList.getNumberOfMessages(severity: Severity): DefaultMessageList

Returns the number of entries with a certain severity.

Receiver

Name Description
DefaultMessageList

Parameters

Name Description
severity: Severity

ReturnValue

Name Description
DefaultMessageList

getTextSummary

fun DefaultMessageList.getTextSummary(): String

Returns a summary of the message numbers depending on the severity.

Receiver

Name Description
DefaultMessageList

ReturnValue

Name Description
String

mergeMessageLists

fun <V : Any> List<ContextMessageList<V>>.mergeMessageLists(): ContextMessageList<List<V>>

Receiver

Name Description
List<ContextMessageList<V>>

ReturnValue

Name Description
ContextMessageList<List<V>>

handleMessageList

inline fun <V : Any> List<ContextMessageList<V>>.handleMessageList(block: (ContextMessageList<V>)->Unit): List<V>

Handles a list of reports with block and then returns only the list of ContextMessageList.value.

Receiver

Name Description
List<ContextMessageList<V>>

list of ContextMessageList to be handled

Parameters

Name Description
block: (ContextMessageList<V>)->Unit

the actual handler for the report message

ReturnValue

Name Description
List<V>

remaining list of ContextMessageList.value

mergeToReport

fun <T> List<T>.mergeToReport(): MessageList<T>

Receiver

Name Description
List<T>

ReturnValue

Name Description
MessageList<T>

merge

fun <T> List<MessageList<T>>.merge(): MessageList<T>

Receiver

Name Description
List<MessageList<T>>

ReturnValue

Name Description
MessageList<T>