public final class CharHandler extends Object
| Constructor and Description |
|---|
CharHandler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addChar(char c,
int length)
Adds a new character in the
VALUES map. |
static void |
addChar(String input,
int length)
Adds a new character from a string in the
VALUES map. |
static @NotNull CharacterInfo |
getInfo(char c)
Gets the requested
CharacterInfo instance of an input character. |
static @NotNull CharacterInfo |
getInfo(String input)
Gets the requested
CharacterInfo instance of an input string. |
static void |
removeChar(char... array)
Removes a character array from the
VALUES map. |
static void |
removeChar(String... array)
Removes characters in a string array from the
VALUES map. |
static @Nullable Character |
toChar(String input)
Converts a string in a single character.
|
@NotNull public static @NotNull CharacterInfo getInfo(char c)
CharacterInfo instance of an input character.
Returns the DEFAULT value if the character isn't found in the VALUES map.
c - an input character@Nullable public static @Nullable Character toChar(String input)
Returns null if the string is null, empty or has more than 1 characters.
input - an input string@NotNull public static @NotNull CharacterInfo getInfo(String input)
CharacterInfo instance of an input string.
Returns the DEFAULT value if the string is null, empty or has more than 1 characters.
input - an input stringpublic static void addChar(char c,
int length)
VALUES map.c - a characterlength - the char's lengthpublic static void removeChar(char... array)
VALUES map.array - a character arraypublic static void addChar(String input, int length)
VALUES map.input - an input stringlength - the char's lengthCopyright © 2023. All rights reserved.