/*******************************************************************************
 * Copyright (C) 2016 Push Technology Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/

package com.pushtechnology.diffusion.transform.transformer;

/**
 * A transformer. Converts values of one type into values of a different
 * type. It will not throw an exception.
 *
 * @param <S> the type of the source values
 * @param <T> the type of the transformed values
 * @author Push Technology Limited
 * @deprecated since 2.0.0 in favour of {@link java.util.function.Function}
 */
@SuppressWarnings("deprecation")
@Deprecated
public interface SafeTransformer<S, T> extends Transformer<S, T> {
    @Override
    T transform(S value);
}

@@ -812,16 +812,53 @@
 ormer;%0A%0A
+import java.util.function.Function;%0A%0A
 /**%0A * A
@@ -1329,11 +1329,206 @@
  value);
+%0A%0A    /**%0A     * Convert the transformer to a function.%0A     *%0A     * @return the transformer as a function%0A     */%0A    default Function%3CS, T%3E asFunction() %7B%0A        return this::transform;%0A    %7D
 %0A%7D%0A

Add a method to convert a safe transformer to a function.