/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }
/** * Creates a terminal {@link Stage} that implements {@link Inflecting} * interface and returns the provided {@link Inflector} instance * when the {@link Inflecting#inflector()} method is called. * * @param <DATA> data type transformable by the stage and returned inflector. * @param <RESULT> type of result produced by a successful inflector data transformation. * @param inflector a request to response transformation to be wrapped in * a stage. * @return a stage that wraps the supplied {@code Inflector}. */ @SuppressWarnings("unchecked") public static <DATA, RESULT> Stage<DATA> asStage(final Inflector<DATA, RESULT> inflector) { return new InflectingStage<DATA, RESULT>(inflector); }