Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

Commit e6db415

Browse files
authored
[ggj][nestedsig] feat: add a TriFunction (#624)
* fix: fix dep ordering in Bazel dedupe rules * feat: add a basic trie * fix: add hashCode() and equals() to Field * fix: add equals() and hashCode() for MethodArgument * feat: add a TriFunction
1 parent c047b4c commit e6db415

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2020 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
package com.google.api.generator.util;
16+
17+
import java.util.Objects;
18+
import java.util.function.Function;
19+
20+
@FunctionalInterface
21+
public interface TriFunction<A, B, C, R> {
22+
R apply(A a, B b, C c);
23+
24+
default <V> TriFunction<A, B, C, V> andThen(Function<? super R, ? extends V> after) {
25+
Objects.requireNonNull(after);
26+
return (A a, B b, C c) -> after.apply(apply(a, b, c));
27+
}
28+
}

0 commit comments

Comments
 (0)