Record Class ConsoleManager.Message
java.lang.Object
java.lang.Record
gaiasky.script.ConsoleManager.Message
- Record Components:
msg- The message string.type- The message type.time- The message creation time.
- Enclosing class:
ConsoleManager
public static record ConsoleManager.Message(String msg, ConsoleManager.MsgType type, Instant time)
extends Record
A single console message. Typically, this is represented visually by a single line.
-
Constructor Summary
ConstructorsConstructorDescriptionMessage(String msg, ConsoleManager.MsgType type, Instant time) Creates an instance of aMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the message with any ANSI codes stripped.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.msg()Returns the value of themsgrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Message
-
-
Method Details
-
cleanMessage
Returns the message with any ANSI codes stripped.- Returns:
- The message with no ANIS codes.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
msg
-
type
-
time
-