Refactor: Remove unused getManaAbilities method (#9169)

This commit is contained in:
DeepCrimson 2022-07-01 17:11:18 -04:00 committed by GitHub
parent 75c8876746
commit 4cd262c45d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 21 deletions

View file

@ -1,6 +1,11 @@
package mage.abilities; package mage.abilities;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.constants.Zone;
import mage.game.Game;
import java.io.Serializable; import java.io.Serializable;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -8,11 +13,6 @@ import java.util.Optional;
import java.util.UUID; import java.util.UUID;
import java.util.function.Predicate; import java.util.function.Predicate;
import mage.abilities.keyword.ProtectionAbility;
import mage.abilities.mana.ActivatedManaAbilityImpl;
import mage.constants.Zone;
import mage.game.Game;
/** /**
* Represents a collection of {@link Ability Abilities}. This is the top most * Represents a collection of {@link Ability Abilities}. This is the top most
* interface for this. * interface for this.
@ -75,14 +75,6 @@ public interface Abilities<T extends Ability> extends List<T>, Serializable {
*/ */
Abilities<ActivatedManaAbilityImpl> getActivatedManaAbilities(Zone zone); Abilities<ActivatedManaAbilityImpl> getActivatedManaAbilities(Zone zone);
/**
* Retrieves a list of all mana abilities (activated and triggered
* abilities)
*
* @param zone
* @return
*/
Abilities<Ability> getManaAbilities(Zone zone);
/** /**
* Retrieves all {@link ActivatedManaAbilityImpl mana abilities} in the * Retrieves all {@link ActivatedManaAbilityImpl mana abilities} in the

View file

@ -135,14 +135,6 @@ public class AbilitiesImpl<T extends Ability> extends ArrayList<T> implements Ab
.collect(Collectors.toCollection(AbilitiesImpl::new)); .collect(Collectors.toCollection(AbilitiesImpl::new));
} }
@Override
public Abilities<Ability> getManaAbilities(Zone zone) {
return stream()
.filter(ability -> ability.getAbilityType() == AbilityType.MANA)
.filter(ability -> ability.getZone().match(zone))
.collect(Collectors.toCollection(AbilitiesImpl::new));
}
@Override @Override
public Abilities<EvasionAbility> getEvasionAbilities() { public Abilities<EvasionAbility> getEvasionAbilities() {
return stream() return stream()