Interface ControlCodeSource<T>

Type Parameters:
T - Attribute source
All Known Implementing Classes:
AnsiBackgroundColorSource, AnsiColorSource, AnsiDecorationSource, AnsiForegroundColorSource

public interface ControlCodeSource<T>
Interface for classes that provide control codes
  • Method Summary

    Modifier and Type
    Method
    Description
    getControlCode(T attributeSource)
    Translates the attribute source into a control code that can be passed to an input/output stream
    Gets a reset code that can be used to reset any changes previously made by any attributes of the type supported by this source
    getResetControlCode(T attributeSource)
    Gets a reset code that can be used to reset any changes previously made by the given attribute
  • Method Details

    • getControlCode

      String getControlCode(T attributeSource)
      Translates the attribute source into a control code that can be passed to an input/output stream
      Parameters:
      attributeSource - Attribute source
      Returns:
      Control code
    • getResetControlCode

      String getResetControlCode(T attributeSource)
      Gets a reset code that can be used to reset any changes previously made by the given attribute
      Parameters:
      attributeSource - Attribute source
      Returns:
      Control code
    • getFullResetControlCode

      String getFullResetControlCode()
      Gets a reset code that can be used to reset any changes previously made by any attributes of the type supported by this source
      Returns:
      Control Code