java.lang.Object
com.github.sttk.linebreak.Term

public final class Term extends Object
Term is the class that provides static methods to get the informations about the terminal.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Size is the record class which represents a terminzal size holding its column count and row count.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    Returns the column count of the current terminal.
    static Term.Size
    Gets the size of the current terminal.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getCols

      public static int getCols()
      Returns the column count of the current terminal. The column count is the count of ASCII printable characters. If it failed to get the count, this function returns the fixed number: 80.
      Returns:
      Terminal column count.
    • getSize

      public static Term.Size getSize()
      Gets the size of the current terminal.
      Returns:
      A Term.Size object holding the current terminal size.