Package org.egothor.stemmer
Class PatchCommandEncoder.Builder
java.lang.Object
org.egothor.stemmer.PatchCommandEncoder.Builder
- Enclosing class:
PatchCommandEncoder
Fluent builder for creating direction-specialized
PatchCommandEncoder
instances.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Creates a builder initialized with the default Egothor-compatible cost model and backward traversal. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a direction-specialized encoder instance.deleteCost(int value) Sets cost of a delete operation.insertCost(int value) Sets cost of an insert operation.matchCost(int value) Sets cost of a match operation.replaceCost(int value) Sets cost of a replace operation.Sets traversal direction used by the created encoder.
-
Constructor Details
-
Builder
public Builder()Creates a builder initialized with the default Egothor-compatible cost model and backward traversal.
-
-
Method Details
-
traversalDirection
Sets traversal direction used by the created encoder.- Parameters:
value- traversal direction- Returns:
- this builder
-
insertCost
Sets cost of an insert operation.- Parameters:
value- cost of the operation- Returns:
- this builder
-
deleteCost
Sets cost of a delete operation.- Parameters:
value- cost of the operation- Returns:
- this builder
-
replaceCost
Sets cost of a replace operation.- Parameters:
value- cost of the operation- Returns:
- this builder
-
matchCost
Sets cost of a match operation.- Parameters:
value- cost of the operation- Returns:
- this builder
-
build
Builds a direction-specialized encoder instance.- Returns:
- configured encoder
-