From 620245f28f57a7be1687f1e2d6db6e7dd48bb5d7 Mon Sep 17 00:00:00 2001 From: vraskulin Date: Thu, 2 Mar 2017 10:51:02 +0300 Subject: [PATCH] Stream format --- Mage.Sets/src/mage/cards/c/Conversion.java | 4 +-- .../src/mage/cards/s/StarfieldOfNyx.java | 26 ++++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/Conversion.java b/Mage.Sets/src/mage/cards/c/Conversion.java index 3204856e19..34bb28a0fb 100644 --- a/Mage.Sets/src/mage/cards/c/Conversion.java +++ b/Mage.Sets/src/mage/cards/c/Conversion.java @@ -43,7 +43,6 @@ import mage.filter.common.FilterLandPermanent; import mage.game.Game; import mage.game.permanent.Permanent; -import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.UUID; @@ -123,7 +122,8 @@ public class Conversion extends CardImpl { @Override public Set isDependentTo(List allEffectsInLayer) { // the dependent classes needs to be an enclosed class for dependent check of continuous effects - return allEffectsInLayer.stream() + return allEffectsInLayer + .stream() .filter(effect->effect.getDependencyTypes().contains(DependencyType.BecomeMountain)) .map(Effect::getId) .collect(Collectors.toSet()); diff --git a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java index c1fedb67e5..088bbc57d6 100644 --- a/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java +++ b/Mage.Sets/src/mage/cards/s/StarfieldOfNyx.java @@ -27,12 +27,6 @@ */ package mage.cards.s; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.UUID; -import java.util.stream.Collectors; - import mage.abilities.Ability; import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; @@ -44,14 +38,7 @@ import mage.abilities.effects.Effect; import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.DependencyType; -import mage.constants.Duration; -import mage.constants.Layer; -import mage.constants.Outcome; -import mage.constants.SubLayer; -import mage.constants.TargetController; -import mage.constants.Zone; +import mage.constants.*; import mage.filter.FilterCard; import mage.filter.common.FilterEnchantmentPermanent; import mage.filter.predicate.Predicates; @@ -64,6 +51,11 @@ import mage.game.Game; import mage.game.permanent.Permanent; import mage.target.common.TargetCardInGraveyard; +import java.util.List; +import java.util.Set; +import java.util.UUID; +import java.util.stream.Collectors; + /** * * @author fireshoes @@ -169,7 +161,11 @@ class StarfieldOfNyxEffect extends ContinuousEffectImpl { @Override public Set isDependentTo(List allEffectsInLayer) { - return allEffectsInLayer.stream().filter(effect->effect.getDependencyTypes().contains(DependencyType.AuraAddingRemoving)).map(Effect::getId).collect(Collectors.toSet()); + return allEffectsInLayer + .stream() + .filter(effect->effect.getDependencyTypes().contains(DependencyType.AuraAddingRemoving)) + .map(Effect::getId) + .collect(Collectors.toSet()); } }