Class Style.SingularCode

  • All Implemented Interfaces:
    Style
    Enclosing interface:
    Style

    public static final class Style.SingularCode
    extends java.lang.Object
    implements Style
    A simple implementation of Style that pushes a single code.
    • Constructor Detail

      • SingularCode

        public SingularCode​(int code)
    • Method Detail

      • pushCodes

        public void pushCodes​(java.util.function.IntConsumer codeConsumer)
        Description copied from interface: Style
        Pushes one or more ANSI color codes to the consumer.

        Most implementations will push a single code, but multiple codes are needed to do things like use 8-bit colors (e.g., 38+5+206 to make pink foreground text).

        Specified by:
        pushCodes in interface Style
        Parameters:
        codeConsumer - Consumer to push integers to.