// Path: src/main/java/se/fearless/fettle/Action.java
// public interface Action<S, E, C> {
// 	/**
// 	 * Called when a transition occurs
// 	 * @param from the state the machine was in before the transition
// 	 * @param to the state the machine is in after the transition
// 	 * @param causedBy the event that triggered the transition
// 	 * @param context the context in which the event was fired supplied to the transition
// 	 * @param stateMachine the machine for which the transition occurred
// 	 */
// 	void onTransition(S from, S to, E causedBy, C context, StateMachine<S, E, C> stateMachine);
// }
// 
// Path: src/main/java/se/fearless/fettle/BasicConditions.java
// public class BasicConditions {
// 
// 	private BasicConditions() {
// 	}
// 
// 	public static <C> Condition<C> always()  {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return true;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> and(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) && second.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> and(final List<Condition<C>> conditions) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				for (Condition<C> condition : conditions) {
// 					if (!condition.isSatisfied(context)) {
// 						return false;
// 					}
// 				}
// 				return true;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> or(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) || second.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> or(final List<Condition<C>> conditions) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				for (Condition<C> condition : conditions) {
// 					if (condition.isSatisfied(context)) {
// 						return true;
// 					}
// 				}
// 				return false;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> not(final Condition<C> condition) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return !condition.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> xor(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) ^ second.isSatisfied(context);
// 			}
// 		};
// 	}
// }
// 
// Path: src/main/java/se/fearless/fettle/Condition.java
// public interface Condition<C> {
// 	boolean isSatisfied(C context);
// }
// 
// Path: src/main/java/se/fearless/fettle/MutableTransitionModel.java
// public interface MutableTransitionModel<S, E, C> extends TransitionModel<S, E, C>, StateMachineTemplate<S, E, C> {
// 
// 	StateMachineTemplate<S, E, C> createImmutableClone();
// 
// 	void addTransition(S from, S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addFromAllTransition(S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addInternalTransition(S from, S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addEntryAction(S entryState, Action<S, E, C> action);
// 
// 	void addExitAction(S exitState, Action<S, E, C> action);
// }
// 
// Path: src/main/java/se/fearless/fettle/util/GuavaReplacement.java
// public class GuavaReplacement {
// 	private GuavaReplacement() {
// 	}
// 
// 	public static <T> List<T> newArrayList() {
// 		return new ArrayList<>();
// 	}
// 
// 	public static <K, V> Map<K, V> newHashMap() {
// 		return new HashMap<>();
// 	}
// }


import se.fearless.fettle.Action;
import se.fearless.fettle.BasicConditions;
import se.fearless.fettle.Condition;
import se.fearless.fettle.MutableTransitionModel;
import se.fearless.fettle.util.GuavaReplacement;
import java.util.List;

package se.fearless.fettle.builder;



class TransitionBuilder<S, E, C> implements Transition<S, E, C>, From<S, E, C>, To<S, E, C>, On<S, E, C>, When<S, E, C>, Internal<S, E, C> {

	private final List<Action<S, E, C>> actions = GuavaReplacement.newArrayList();
	private S from;
	private S to;
	private E event;

// Path: src/main/java/se/fearless/fettle/Action.java
// public interface Action<S, E, C> {
// 	/**
// 	 * Called when a transition occurs
// 	 * @param from the state the machine was in before the transition
// 	 * @param to the state the machine is in after the transition
// 	 * @param causedBy the event that triggered the transition
// 	 * @param context the context in which the event was fired supplied to the transition
// 	 * @param stateMachine the machine for which the transition occurred
// 	 */
// 	void onTransition(S from, S to, E causedBy, C context, StateMachine<S, E, C> stateMachine);
// }
// 
// Path: src/main/java/se/fearless/fettle/BasicConditions.java
// public class BasicConditions {
// 
// 	private BasicConditions() {
// 	}
// 
// 	public static <C> Condition<C> always()  {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return true;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> and(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) && second.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> and(final List<Condition<C>> conditions) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				for (Condition<C> condition : conditions) {
// 					if (!condition.isSatisfied(context)) {
// 						return false;
// 					}
// 				}
// 				return true;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> or(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) || second.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> or(final List<Condition<C>> conditions) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				for (Condition<C> condition : conditions) {
// 					if (condition.isSatisfied(context)) {
// 						return true;
// 					}
// 				}
// 				return false;
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> not(final Condition<C> condition) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return !condition.isSatisfied(context);
// 			}
// 		};
// 	}
// 
// 	public static <C> Condition<C> xor(final Condition<C> first, final Condition<C> second) {
// 		return new Condition<C>() {
// 			@Override
// 			public boolean isSatisfied(C context) {
// 				return first.isSatisfied(context) ^ second.isSatisfied(context);
// 			}
// 		};
// 	}
// }
// 
// Path: src/main/java/se/fearless/fettle/Condition.java
// public interface Condition<C> {
// 	boolean isSatisfied(C context);
// }
// 
// Path: src/main/java/se/fearless/fettle/MutableTransitionModel.java
// public interface MutableTransitionModel<S, E, C> extends TransitionModel<S, E, C>, StateMachineTemplate<S, E, C> {
// 
// 	StateMachineTemplate<S, E, C> createImmutableClone();
// 
// 	void addTransition(S from, S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addFromAllTransition(S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addInternalTransition(S from, S to, E event, Condition<C> condition, List<Action<S, E, C>> actions);
// 
// 	void addEntryAction(S entryState, Action<S, E, C> action);
// 
// 	void addExitAction(S exitState, Action<S, E, C> action);
// }
// 
// Path: src/main/java/se/fearless/fettle/util/GuavaReplacement.java
// public class GuavaReplacement {
// 	private GuavaReplacement() {
// 	}
// 
// 	public static <T> List<T> newArrayList() {
// 		return new ArrayList<>();
// 	}
// 
// 	public static <K, V> Map<K, V> newHashMap() {
// 		return new HashMap<>();
// 	}
// }


// Path: src/main/java/se/fearless/fettle/builder/TransitionBuilder.java
import se.fearless.fettle.Action;
import se.fearless.fettle.BasicConditions;
import se.fearless.fettle.Condition;
import se.fearless.fettle.MutableTransitionModel;
import se.fearless.fettle.util.GuavaReplacement;
import java.util.List;

package se.fearless.fettle.builder;



class TransitionBuilder<S, E, C> implements Transition<S, E, C>, From<S, E, C>, To<S, E, C>, On<S, E, C>, When<S, E, C>, Internal<S, E, C> {

	private final List<Action<S, E, C>> actions = GuavaReplacement.newArrayList();
	private S from;
	private S to;
	private E event;

	private Condition<C> condition = BasicConditions.always();
