mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Remove unused SpellContainer code
This commit is contained in:
parent
cb50ec544c
commit
d38005c5bf
1 changed files with 0 additions and 80 deletions
|
@ -10,41 +10,6 @@ import org.jetbrains.annotations.Nullable;
|
|||
import com.minelittlepony.unicopia.ability.magic.spell.Spell;
|
||||
|
||||
public interface SpellContainer {
|
||||
SpellContainer EMPTY = new SpellContainer() {
|
||||
@Override
|
||||
public <T extends Spell> Optional<T> get(SpellPredicate<T> type, boolean update) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void put(Spell effect) { }
|
||||
|
||||
@Override
|
||||
public boolean clear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeIf(Predicate<Spell> effect, boolean update) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean forEach(Function<Spell, Operation> action, boolean update) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(UUID id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Stream<Spell> stream(boolean update) {
|
||||
return Stream.empty();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if a spell with the given uuid is present.
|
||||
*/
|
||||
|
@ -95,51 +60,6 @@ public interface SpellContainer {
|
|||
*/
|
||||
boolean clear();
|
||||
|
||||
interface Delegate extends SpellContainer {
|
||||
|
||||
SpellContainer delegate();
|
||||
|
||||
@Override
|
||||
default boolean contains(UUID id) {
|
||||
return delegate().contains(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean contains(@Nullable SpellPredicate<?> type) {
|
||||
return delegate().contains(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
default <T extends Spell> Optional<T> get(@Nullable SpellPredicate<T> type, boolean update) {
|
||||
return delegate().get(type, update);
|
||||
}
|
||||
|
||||
@Override
|
||||
default void put(@Nullable Spell effect) {
|
||||
delegate().put(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean removeIf(Predicate<Spell> effect, boolean update) {
|
||||
return delegate().removeIf(effect, update);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean forEach(Function<Spell, Operation> action, boolean update) {
|
||||
return delegate().forEach(action, update);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean clear() {
|
||||
return delegate().clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
default Stream<Spell> stream(boolean update) {
|
||||
return delegate().stream(update);
|
||||
}
|
||||
}
|
||||
|
||||
public enum Operation {
|
||||
SKIP,
|
||||
KEEP,
|
||||
|
|
Loading…
Reference in a new issue