mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-20 11:50:57 +07:00
18 lines
475 B
Java
18 lines
475 B
Java
abstract class Tmp<T> {
|
|
private String concat(Tmp<String> tmp) {
|
|
return tmp.collect(StringBuilder::new, StringBuilder::append, StringBuilder::append).toString();
|
|
}
|
|
|
|
abstract <R> R collect(Supplier<R> supplier,
|
|
BiConsumer<R, ? super T> accumulator,
|
|
BiConsumer<R, R> combiner);
|
|
|
|
interface Supplier<T> {
|
|
T get();
|
|
}
|
|
|
|
interface BiConsumer<T, U> {
|
|
void accept(T t, U u);
|
|
}
|
|
}
|