@FunctionalInterface
public interface TextContentConverter
| Modifier and Type | Field | Description |
|---|---|---|
static TextContentConverter |
IDENTITY |
| Modifier and Type | Method | Description |
|---|---|---|
default TextContentConverter |
andThen(TextContentConverter other) |
Returns a converter that first applies this converter and then
other. |
default TextContentConverter |
compose(TextContentConverter other) |
Returns a converter that first applies
other then this converter. |
java.lang.String |
convertTextContent(Parent parent,
java.lang.String content) |
|
static TextContentConverter |
fromContentFunction(java.util.function.Function<java.lang.String,java.lang.String> function) |
Creates a new TextContentConverter from a content converter function.
|
static TextContentConverter |
fromContentMap(java.util.Map<java.lang.String,java.lang.String> map) |
Creates a new TextContentConverter from a map.
|
static TextContentConverter |
fromNameMap(java.util.Map<java.lang.String,java.lang.String> map) |
|
static TextContentConverter |
fromPathMap(java.util.Map<SPath,java.lang.String> map) |
|
static TextContentConverter |
fromString(java.lang.String s) |
|
static TextContentConverter |
scramble(boolean preserveSpaces) |
static final TextContentConverter IDENTITY
java.lang.String convertTextContent(Parent parent, java.lang.String content)
default TextContentConverter compose(TextContentConverter other)
other then this converter.other - The other converter.other then this converter.java.lang.IllegalArgumentException - When other is null.default TextContentConverter andThen(TextContentConverter other)
other.other - The other converter.other.java.lang.IllegalArgumentException - When other is null.static TextContentConverter fromString(java.lang.String s)
static TextContentConverter scramble(boolean preserveSpaces)
static TextContentConverter fromContentFunction(java.util.function.Function<java.lang.String,java.lang.String> function)
Conversion is independent of element.
function - The function used to convert content.function.java.lang.IllegalArgumentException - When function is null.static TextContentConverter fromContentMap(java.util.Map<java.lang.String,java.lang.String> map)
Conversion is independent of element and attribute name.
If a value is not mapped, then result is that value.
map - The map.map.java.lang.IllegalArgumentException - When map is null.static TextContentConverter fromNameMap(java.util.Map<java.lang.String,java.lang.String> map)
static TextContentConverter fromPathMap(java.util.Map<SPath,java.lang.String> map)
Copyright © 2019. All rights reserved.