com.github.dylon.liblevenshtein.collection.dawg.factory.PrefixFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liblevenshtein Show documentation
Show all versions of liblevenshtein Show documentation
A library for spelling-correction based on Levenshtein Automata.
// Generated by delombok at Tue May 03 21:35:17 PDT 2016
package com.github.dylon.liblevenshtein.collection.dawg.factory;
import java.io.Serializable;
import com.github.dylon.liblevenshtein.collection.dawg.Prefix;
/**
* Builds {@link Prefix}es that build the terms in a DAWG structure.
* @param Kind of nodes encapsulated by the {@link Prefix}es.
* @author Dylon Edwards
* @since 2.1.0
*/
public class PrefixFactory implements IPrefixFactory, Serializable {
private static final long serialVersionUID = 1L;
/**
* {@inheritDoc}
*/
@Override
public Prefix build(final DictionaryNode node, final String value) {
final com.github.dylon.liblevenshtein.collection.dawg.Prefix prefix = new Prefix();
return prefix.node(node).value(value);
}
}