com.intellij.openapi.util.Pass Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of symbol-processing-aa Show documentation
Show all versions of symbol-processing-aa Show documentation
KSP implementation on Kotlin Analysis API
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.util;
import org.jetbrains.annotations.NotNull;
import java.util.function.Consumer;
/**
* Use {@link Consumer} instead
*/
public abstract class Pass implements Consumer {
public abstract void pass(T t);
@Override
public void accept(T t) {
pass(t);
}
public static @NotNull Pass create(@NotNull Consumer consumer) {
return new Pass() {
@Override
public void pass(T o) {
consumer.accept(o);
}
};
}
}