// Path: src/main/java/com/github/liblevenshtein/transducer/factory/PositionTransitionFactory.java
// @Setter
// @NoArgsConstructor(access = AccessLevel.PROTECTED)
// public abstract class PositionTransitionFactory implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Builds Levenshtein states.
//    */
//   protected StateFactory stateFactory;
// 
//   /**
//    * Builds Levenshtein positions.
//    */
//   protected PositionFactory positionFactory;
// 
//   /**
//    * Builds a new position-transition function.
//    * @return New position-transition function.
//    */
//   public abstract PositionTransitionFunction build();
// 
//   /**
//    * Builds position-transition functions for standard, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForStandardPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new StandardPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// 
//   /**
//    * Builds position-transition functions for transposition, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForTranspositionPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new TranspositionPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// 
//   /**
//    * Builds position-transition functions for merge-and-split, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForMergeAndSplitPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new MergeAndSplitPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// }
// 
// Path: src/main/java/com/github/liblevenshtein/transducer/factory/StateFactory.java
// public class StateFactory implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Builds a new, Levenshtein state with the given position vectors.
//    * @param positions Array of position vectors to link into the state.
//    * @return New state having the position vectors.
//    */
//   public State build(final Position... positions) {
//     final State state = new State();
// 
//     Position prev = null;
//     for (final Position curr : positions) {
//       state.insertAfter(prev, curr);
//       prev = curr;
//     }
// 
//     return state;
//   }
// }


import java.io.Serializable;
import java.util.Comparator;
import lombok.Setter;
import com.github.liblevenshtein.transducer.factory.PositionTransitionFactory;
import com.github.liblevenshtein.transducer.factory.StateFactory;
package com.github.liblevenshtein.transducer;




/**
 * Transitions one state to another, given a set of inputs.  This function
 * doesn't need to know about the Levenshtein algorithm, as the
 * algorithm-specific components are injected via setters.
 * @author Dylon Edwards
 * @since 2.1.0
 */
@Setter
public class StateTransitionFunction implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * Sorts {@link State} elements in an unsubsumption-friendly fashion.
   */
  private Comparator<Position> comparator;

  /**
   * Builds and recycles {@link State} instances.
   */
// Path: src/main/java/com/github/liblevenshtein/transducer/factory/PositionTransitionFactory.java
// @Setter
// @NoArgsConstructor(access = AccessLevel.PROTECTED)
// public abstract class PositionTransitionFactory implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Builds Levenshtein states.
//    */
//   protected StateFactory stateFactory;
// 
//   /**
//    * Builds Levenshtein positions.
//    */
//   protected PositionFactory positionFactory;
// 
//   /**
//    * Builds a new position-transition function.
//    * @return New position-transition function.
//    */
//   public abstract PositionTransitionFunction build();
// 
//   /**
//    * Builds position-transition functions for standard, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForStandardPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new StandardPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// 
//   /**
//    * Builds position-transition functions for transposition, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForTranspositionPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new TranspositionPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// 
//   /**
//    * Builds position-transition functions for merge-and-split, Levenshtein states.
//    * @author Dylon Edwards
//    * @since 2.1.0
//    */
//   public static class ForMergeAndSplitPositions extends PositionTransitionFactory {
// 
//     private static final long serialVersionUID = 1L;
// 
//     /**
//      * {@inheritDoc}
//      */
//     @Override
//     public PositionTransitionFunction build() {
//       return new MergeAndSplitPositionTransitionFunction()
//         .stateFactory(stateFactory)
//         .positionFactory(positionFactory);
//     }
//   }
// }
// 
// Path: src/main/java/com/github/liblevenshtein/transducer/factory/StateFactory.java
// public class StateFactory implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Builds a new, Levenshtein state with the given position vectors.
//    * @param positions Array of position vectors to link into the state.
//    * @return New state having the position vectors.
//    */
//   public State build(final Position... positions) {
//     final State state = new State();
// 
//     Position prev = null;
//     for (final Position curr : positions) {
//       state.insertAfter(prev, curr);
//       prev = curr;
//     }
// 
//     return state;
//   }
// }


// Path: src/main/java/com/github/liblevenshtein/transducer/StateTransitionFunction.java
import java.io.Serializable;
import java.util.Comparator;
import lombok.Setter;
import com.github.liblevenshtein.transducer.factory.PositionTransitionFactory;
import com.github.liblevenshtein.transducer.factory.StateFactory;

package com.github.liblevenshtein.transducer;




/**
 * Transitions one state to another, given a set of inputs.  This function
 * doesn't need to know about the Levenshtein algorithm, as the
 * algorithm-specific components are injected via setters.
 * @author Dylon Edwards
 * @since 2.1.0
 */
@Setter
public class StateTransitionFunction implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * Sorts {@link State} elements in an unsubsumption-friendly fashion.
   */
  private Comparator<Position> comparator;

  /**
   * Builds and recycles {@link State} instances.
   */
  private StateFactory stateFactory;