Interface CharMapper
-
public interface CharMapper
-
-
Field Summary
Fields Modifier and Type Field Description static CharMapper
IDENTITY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default CharMapper
andThen(CharMapper after)
Returns a composed operator that first applies this operator to its input, and then applies theafter
operator to the result.default CharMapper
compose(CharMapper before)
Returns a composed operator that first applies thebefore
operator to its input, and then applies this operator to the result.static CharMapper
identity()
Returns a unary operator that always returns its input argument.char
map(char codePoint)
Map characters
-
-
-
Field Detail
-
IDENTITY
static final CharMapper IDENTITY
-
-
Method Detail
-
map
char map(char codePoint)
Map characters- Parameters:
codePoint
- code point- Returns:
- mapped character
-
compose
default CharMapper compose(CharMapper before)
Returns a composed operator that first applies thebefore
operator 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
before
operator and then applies this operator - Throws:
java.lang.NullPointerException
- if before is null- See Also:
andThen(CharMapper)
-
andThen
default CharMapper andThen(CharMapper after)
Returns a composed operator that first applies this operator to its input, and then applies theafter
operator 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
after
operator - Throws:
java.lang.NullPointerException
- if after is null- See Also:
compose(CharMapper)
-
identity
static CharMapper identity()
Returns a unary operator that always returns its input argument.- Returns:
- a unary operator that always returns its input argument
-
-