Constructor and Description |
---|
CharMap(String source,
String destination)
Creates a char map with the given source and destination characters.
|
Modifier and Type | Method and Description |
---|---|
void |
add(char source,
char destination)
Adds the given mapping
source --> destination to this char map. |
void |
add(String source,
String destination)
Adds the given source and destination characters to this char map..
|
char |
map(char source) |
public CharMap(String source, String destination)
source[0] --> destination[0]
, all other mappings in an analogous
way with matching character indices in the two strings.source
- source charactersdestination
- destination charactersIllegalArgumentException
- if any of the destination characters is the zero characterpublic void add(String source, String destination)
source[0] --> destination[0]
, all other mappings in an analogous
way with matching character indices in the two strings.source
- source charactersdestination
- destination charactersIllegalArgumentException
- if any of the destination characters is the zero characterpublic void add(char source, char destination)
source --> destination
to this char map.source
- source characterdestination
- destination characterIllegalArgumentException
- if the destination character is the zero characterpublic char map(char source)
Copyright © 2024. All rights reserved.