Class Console


  • public class Console
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Console()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void ansiWrite​(java.lang.String ansiStart, java.lang.String text, LogType type)
      Writes text to the console, with ANSI color.
      static void ansiWriteLine​(java.lang.String ansiStart, java.lang.String text, LogType type)
      Writes a line to the console, with ANSI color.
      static void clear()
      Clears the console.
      static java.lang.String readLine()
      Reads a line from the console input.
      static void setTitle​(java.lang.String text)
      Sets the title of the terminal.
      static void write​(java.lang.String text, LogType type)
      Writes text to the console.
      static void writeLine​(java.lang.String text, LogType type)
      Writes a line to the console.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Console

        public Console()
    • Method Detail

      • writeLine

        public static void writeLine​(java.lang.String text,
                                     LogType type)
        Writes a line to the console.
        Parameters:
        text - The text to write.
        type - The type of log.
      • write

        public static void write​(java.lang.String text,
                                 LogType type)
        Writes text to the console.
        Parameters:
        text - The text to write.
        type - The type of log.
      • ansiWriteLine

        public static void ansiWriteLine​(java.lang.String ansiStart,
                                         java.lang.String text,
                                         LogType type)
        Writes a line to the console, with ANSI color.
        Parameters:
        ansiStart - The ANSI color code.
        text - The text to write.
        type - The type of log.
      • ansiWrite

        public static void ansiWrite​(java.lang.String ansiStart,
                                     java.lang.String text,
                                     LogType type)
        Writes text to the console, with ANSI color.
        Parameters:
        ansiStart - The ANSI color code.
        text - The text to write.
        type - The type of log.
      • clear

        public static void clear()
        Clears the console.
      • setTitle

        public static void setTitle​(java.lang.String text)
        Sets the title of the terminal.
        Parameters:
        text - The title to set.
      • readLine

        public static java.lang.String readLine()
        Reads a line from the console input.
        Returns:
        The latest line from the console input, if any.