Class NormalizeCharMap.Builder
java.lang.Object
org.apache.lucene.analysis.charfilter.NormalizeCharMap.Builder
- Enclosing class:
- NormalizeCharMap
Builds an NormalizeCharMap.
Call add() until you have added all the mappings, then call build() to get a NormalizeCharMap
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Records a replacement to be applied to the input stream.build()
Builds the NormalizeCharMap; call this once you are done callingadd(java.lang.String, java.lang.String)
.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
add
Records a replacement to be applied to the input stream. WheneversingleMatch
occurs in the input, it will be replaced withreplacement
.- Parameters:
match
- input String to be replacedreplacement
- output String- Throws:
IllegalArgumentException
- ifmatch
is the empty string, or was already previously added
-
build
Builds the NormalizeCharMap; call this once you are done callingadd(java.lang.String, java.lang.String)
.
-