Package de.linusdev.lutils.ansi.sgr
Interface SGRParameter
- All Known Implementing Classes:
SGRParameters
public interface SGRParameter
-
Method Summary
Modifier and TypeMethodDescriptionintHow many arguments this parameter requires.default @NotNull StringConstructs a string for thisSGRParameterwith given parameters.intThe 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 thisSGRParameterwith given parameters.- Parameters:
delimiter- the delimiter used to separate parameters. UsuallySGR.SGR_PARAMETER_DELIMITER.params- parameters for this SGR parameter- Returns:
- constructed SGR parameter string
- Throws:
IllegalArgumentException- ifargumentCount()is zero or positive and length of givenparamsis not the same asargumentCount()
-