Interface SGRParameter

All Known Implementing Classes:
SGRParameters

public interface SGRParameter
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    How many arguments this parameter requires.
    default @NotNull String
    construct(@NotNull String delimiter, @NotNull String @NotNull ... params)
    Constructs a string for this SGRParameter with given parameters.
    int
    The identifier of this parameter.
  • Method Details

    • getIdentifier

      int getIdentifier()
      The identifier of this parameter.
      Returns:
      code
    • argumentCount

      int argumentCount()
      How many arguments this parameter requires. Negative numbers for an unknown amount.
      Returns:
      required number of parameters or any negative number.
    • construct

      @NotNull default @NotNull String construct(@NotNull @NotNull String delimiter, @NotNull @NotNull String @NotNull ... params)
      Constructs a string for this SGRParameter with given parameters.
      Parameters:
      delimiter - the delimiter used to separate parameters. Usually SGR.SGR_PARAMETER_DELIMITER.
      params - parameters for this SGR parameter
      Returns:
      constructed SGR parameter string
      Throws:
      IllegalArgumentException - if argumentCount() is zero or positive and length of given params is not the same as argumentCount()