public Successor<O> apply(Operator operator) { return new Successor<O>(getChildStateForOperator(operator), operator, costOf(operator)); } });
/** * Works out all the possible successors by applying all the operators returned by the * {@link Traversable#validOperators} method. * * @param reverse When set, indicates that the successors should be presented in reverse order. * * @return An iterator over all the {@link Successor}s that can be reached by applying valid operators to this * state. */ public Iterator<Successor<O>> successors(boolean reverse) { return new Filterator<Operator<O>, Successor<O>>(validOperators(reverse), new Function<Operator<O>, Successor<O>>() { public Successor<O> apply(Operator operator) { return new Successor<O>(getChildStateForOperator(operator), operator, costOf(operator)); } }); }
/** * Works out all the possible successors by applying all the operators returned by the * {@link Traversable#validOperators} method. * * @param reverse When set, indicates that the successors should be presented in reverse order. * * @return An iterator over all the {@link Successor}s that can be reached by applying valid operators to this * state. */ public Iterator<Successor<O>> successors(boolean reverse) { return new Filterator<Operator<O>, Successor<O>>(validOperators(reverse), new Function<Operator<O>, Successor<O>>() { public Successor<O> apply(Operator operator) { return new Successor<O>(getChildStateForOperator(operator), operator, costOf(operator)); } }); }
public Successor<O> apply(Operator operator) { return new Successor<O>(getChildStateForOperator(operator), operator, costOf(operator)); } });