View Javadoc

1   /*
2      Copyright 2011 Atlassian
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15   */
16  package io.atlassian.fugue.deprecated;
17  
18  import java.util.function.BiFunction;
19  
20  /**
21   * Represents a function that takes two parameters.
22   *
23   * @param <A> the type of the first argument accepted
24   * @param <B> the type of the result
25   * @param <C> the type of the result of application
26   * @since 1.0
27   * @deprecated since 2.4 use BiFunction instead
28   */
29  @Deprecated public interface Function2<A, B, C> extends BiFunction<A, B, C> {
30    /**
31     * Returns the results of applying this function to the supplied arguments.
32     * Like Guava's Function, this method is <em>generally expected</em>, but not
33     * absolutely required, to have the following properties: * it's execution
34     * does not cause any observable side effect * the computation is
35     * <em>consistent with equals</em>; that is, Objects.equal(a, b) implies that
36     * Objects.equal(function.apply(a), function.apply(b)).
37     *
38     * @param arg1 the first argument
39     * @param arg2 the second argument
40     * @return the result, should not be null
41     * @deprecated since 2.4 use BiFunction instead
42     */
43    @Deprecated C apply(A arg1, B arg2);
44  }