Interface CharMapper
- All Known Implementing Classes:
ChangeCase.ToLowerCase, ChangeCase.ToUpperCase, NullEncoder.DecodeNull, NullEncoder.EncodeNull, SpaceMapper.FromNonBreakSpace, SpaceMapper.FromPredicate, SpaceMapper.ToNonBreakSpace
public interface CharMapper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault CharMapperandThen(CharMapper after) Returns a composed operator that first applies this operator to its input, and then applies theafteroperator to the result.default CharMappercompose(CharMapper before) Returns a composed operator that first applies thebeforeoperator to its input, and then applies this operator to the result.static CharMapperidentity()Returns a unary operator that always returns its input argument.charmap(char codePoint) Map characters
-
Field Details
-
IDENTITY
-
-
Method Details
-
map
char map(char codePoint) Map characters- Parameters:
codePoint- code point- Returns:
- mapped character
-
compose
Returns a composed operator that first applies thebeforeoperator to its input, and then applies this operator to the result. If evaluation of either operator throws an exception, it is relayed to the caller of the composed operator.- Parameters:
before- the operator to apply before this operator is applied- Returns:
- a composed operator that first applies the
beforeoperator and then applies this operator - Throws:
NullPointerException- if before is null- See Also:
-
andThen
Returns a composed operator that first applies this operator to its input, and then applies theafteroperator to the result. If evaluation of either operator throws an exception, it is relayed to the caller of the composed operator.- Parameters:
after- the operator to apply after this operator is applied- Returns:
- a composed operator that first applies this operator and then
applies the
afteroperator - Throws:
NullPointerException- if after is null- See Also:
-
identity
Returns a unary operator that always returns its input argument.- Returns:
- a unary operator that always returns its input argument
-