Functional interfaces should be annotated as functional interfaces

This commit is contained in:
vraskulin 2017-02-15 19:23:12 +03:00
parent f1ef3bf68b
commit 752392fc46
22 changed files with 28 additions and 10 deletions

View file

@ -35,6 +35,7 @@ import java.util.UUID;
*
* @author BetaSteward_at_googlemail.com
*/
@FunctionalInterface
public interface MageItem extends Serializable {
UUID getId();

View file

@ -10,6 +10,7 @@ import mage.game.Game;
*
* @author nantuko, noxx
*/
@FunctionalInterface
public interface Condition extends Serializable {
public enum ComparisonType {

View file

@ -1,3 +1,4 @@
/*
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
@ -38,6 +39,7 @@ import mage.game.Game;
*
* @author nantuko
*/
@FunctionalInterface
public interface AdjustingSourceCosts {
void adjustCosts(Ability ability, Game game);
}

View file

@ -38,6 +38,7 @@ import mage.game.Game;
*
* @author LevelX2
*/
@FunctionalInterface
public interface AlternateManaPaymentAbility {
/**
* Adds the special action to the state, that allows the user to do the alternate mana payment

View file

@ -32,6 +32,7 @@ import java.io.Serializable;
/**
* @author noxx
*/
@FunctionalInterface
public interface Builder<T> extends Serializable {
T build(Object... options);

View file

@ -32,5 +32,6 @@ package mage.filter.predicate;
* @author North
* @param <T>
*/
@FunctionalInterface
public interface ObjectPlayerPredicate<T extends ObjectPlayer> extends Predicate<T> {
}

View file

@ -32,5 +32,6 @@ package mage.filter.predicate;
* @author North
* @param <T>
*/
@FunctionalInterface
public interface ObjectSourcePlayerPredicate<T extends ObjectSourcePlayer> extends ObjectPlayerPredicate<T> {
}

View file

@ -36,6 +36,7 @@ import mage.game.Game;
* @author North
* @param <T>
*/
@FunctionalInterface
public interface Predicate <T> extends Serializable {
/**
* Returns the result of applying this predicate to {@code input}. This method is <i>generally

View file

@ -64,6 +64,7 @@ public class Table implements Serializable {
private Tournament tournament;
private TableRecorder recorder;
@FunctionalInterface
public interface TableRecorder {
void record(Table table);
}

View file

@ -34,6 +34,7 @@ import java.io.Serializable;
*
* @author BetaSteward_at_googlemail.com
*/
@FunctionalInterface
public interface Listener<E extends ExternalEvent> extends Serializable {
void event(E event);
}

View file

@ -27,6 +27,8 @@
*/
package mage.util;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

View file

@ -32,7 +32,7 @@ package mage.util;
*
* @author BetaSteward_at_googlemail.com
*/
@FunctionalInterface
public interface Copyable<T> {
T copy();
}

View file

@ -30,6 +30,7 @@ package mage.util.functions;
/**
* @author nantuko
*/
@FunctionalInterface
public interface Function<X, Y> {
X apply(Y in);
}