All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dylon.liblevenshtein.levenshtein.factory.IntersectionFactory Maven / Gradle / Ivy

The newest version!
// Generated by delombok at Sat Apr 30 14:43:05 PDT 2016
package com.github.dylon.liblevenshtein.levenshtein.factory;

import java.io.Serializable;
import com.github.dylon.liblevenshtein.levenshtein.Intersection;
import com.github.dylon.liblevenshtein.levenshtein.IState;

/**
 * Builds intersections between a dictionary automaton and a Levenshtein
 * automaton.
 * @param  Kind of nodes in the dictionary automaton.
 * @author Dylon Edwards
 * @since 2.1.0
 */
public class IntersectionFactory implements IIntersectionFactory, Serializable {
  private static final long serialVersionUID = 1L;

  /**
   * {@inheritDoc}
   */
  @Override
  public Intersection build(final String candidate, final DictionaryNode dictionaryNode, final IState levenshteinState) {
    final com.github.dylon.liblevenshtein.levenshtein.Intersection intersection = new Intersection();
    intersection.candidate(candidate);
    intersection.dictionaryNode(dictionaryNode);
    intersection.levenshteinState(levenshteinState);
    return intersection;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy