summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/util/Callback.java
blob: 8920532962a8ea84526ebc97bd5c065f3f88bba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package org.bukkit.util;

/**
 * Primitive callback class, to allow specific callback handling. For example to determine if a block in sight is invisible.
 *
 * @param <Result> This is the type it will return.
 * @param <Parameter> This is the type it has as parameter.
 */
public interface Callback<Result, Parameter> {

    /**
     * This method will be called on each step.
     *
     * @param parameter The parameter of this step.
     * @return The result of the step.
     */
    public Result call(Parameter parameter);

}