All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intellij.openapi.util.Pass Maven / Gradle / Ivy

There is a newer version: 2.1.0-Beta1-1.0.25
Show newest version
// 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);
      }
    };
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy