/** * Returns a {@link Predicate} that returns <code>true</code> when passed a * {@link Machine} in a given {@link MachineState}. * * @param state * The {@link MachineState} for which this {@link Predicate} will * return <code>true</code>. * @return */ public static Predicate<? super Machine> inState(MachineState state) { return new MachineWithState(state); }