diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java index fafe47f266..f68d71d251 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/SetCardSubtypeAttachedEffect.java @@ -29,13 +29,16 @@ package mage.abilities.effects.common.continuous; import mage.abilities.Ability; import mage.abilities.effects.ContinuousEffectImpl; -import mage.constants.*; +import mage.constants.AttachmentType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.SubLayer; +import mage.constants.SubType; import mage.game.Game; import mage.game.permanent.Permanent; import mage.util.SubTypeList; -import java.util.List; - /** * @author nantuko */ @@ -44,7 +47,14 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { private SubTypeList setSubtypes = new SubTypeList(); private final AttachmentType attachmentType; - public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) { + public SetCardSubtypeAttachedEffect(Duration duration, AttachmentType attachmentType, SubType... setSubtype) { + super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); + this.setSubtypes.add(setSubtype); + this.attachmentType = attachmentType; + this.setText(); + } + + /*public SetCardSubtypeAttachedEffect(SubType setSubtype, Duration duration, AttachmentType attachmentType) { super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); this.setSubtypes.add(setSubtype); this.attachmentType = attachmentType; @@ -56,7 +66,7 @@ public class SetCardSubtypeAttachedEffect extends ContinuousEffectImpl { this.setSubtypes.addAll(setSubtypes); this.attachmentType = attachmentType; setText(); - } + }*/ public SetCardSubtypeAttachedEffect(final SetCardSubtypeAttachedEffect effect) { super(effect); diff --git a/Mage/src/main/java/mage/constants/SubType.java b/Mage/src/main/java/mage/constants/SubType.java index cd6edde011..9c597260dc 100644 --- a/Mage/src/main/java/mage/constants/SubType.java +++ b/Mage/src/main/java/mage/constants/SubType.java @@ -1,396 +1,410 @@ package mage.constants; -import mage.util.SubTypeList; - import java.util.Arrays; import java.util.EnumSet; import java.util.Set; import java.util.stream.Collectors; +import mage.util.SubTypeList; + public enum SubType { //205.3k Instants and sorceries share their lists of subtypes; these subtypes are called spell types. - ARCANE("Arcane", SubTypeSet.SpellType, false), - TRAP("Trap", SubTypeSet.SpellType, false), + ARCANE("Arcane", SubTypeSet.SpellType), + TRAP("Trap", SubTypeSet.SpellType), + // 205.3i: Lands have their own unique set of subtypes; these subtypes are called land types. // Of that list, Forest, Island, Mountain, Plains, and Swamp are the basic land types. - FOREST("Forest", SubTypeSet.BasicLandType, false), - ISLAND("Island", SubTypeSet.BasicLandType, false), - MOUNTAIN("Mountain", SubTypeSet.BasicLandType, false), - PLAINS("Plains", SubTypeSet.BasicLandType, false), - SWAMP("Swamp", SubTypeSet.BasicLandType, false), - DESERT("Desert", SubTypeSet.NonBasicLandType, false), - GATE("Gate", SubTypeSet.NonBasicLandType, false), - LAIR("Lair", SubTypeSet.NonBasicLandType, false), - LOCUS("Locus", SubTypeSet.NonBasicLandType, false), - URZAS("Urza's", SubTypeSet.NonBasicLandType, false), - MINE("Mine", SubTypeSet.NonBasicLandType, false), - POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType, false), - TOWER("Tower", SubTypeSet.NonBasicLandType, false), + FOREST("Forest", SubTypeSet.BasicLandType), + ISLAND("Island", SubTypeSet.BasicLandType), + MOUNTAIN("Mountain", SubTypeSet.BasicLandType), + PLAINS("Plains", SubTypeSet.BasicLandType), + SWAMP("Swamp", SubTypeSet.BasicLandType), + DESERT("Desert", SubTypeSet.NonBasicLandType), + GATE("Gate", SubTypeSet.NonBasicLandType), + LAIR("Lair", SubTypeSet.NonBasicLandType), + LOCUS("Locus", SubTypeSet.NonBasicLandType), + URZAS("Urza's", SubTypeSet.NonBasicLandType), + MINE("Mine", SubTypeSet.NonBasicLandType), + POWER_PLANT("Power-Plant", SubTypeSet.NonBasicLandType), + TOWER("Tower", SubTypeSet.NonBasicLandType), + // 205.3h Enchantments have their own unique set of subtypes; these subtypes are called enchantment types. - AURA("Aura", SubTypeSet.EnchantmentType, false), - CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType, false), - CURSE("Curse", SubTypeSet.EnchantmentType, false), - SHRINE("Shrine", SubTypeSet.EnchantmentType, false), + AURA("Aura", SubTypeSet.EnchantmentType), + CARTOUCHE("Cartouche", SubTypeSet.EnchantmentType), + CURSE("Curse", SubTypeSet.EnchantmentType), + SHRINE("Shrine", SubTypeSet.EnchantmentType), + // 205.3g: Artifacts have their own unique set of subtypes; these subtypes are called artifact types. - CLUE("Clue", SubTypeSet.ArtifactType, false), - CONTRAPTION("Contraption", SubTypeSet.ArtifactType, false), - EQUIPMENT("Equipment", SubTypeSet.ArtifactType, false), - FORTIFICATION("Fortification", SubTypeSet.ArtifactType, false), - TREASURE("Treasure", SubTypeSet.ArtifactType, false), - VEHICLE("Vehicle", SubTypeSet.ArtifactType, false), + CLUE("Clue", SubTypeSet.ArtifactType), + CONTRAPTION("Contraption", SubTypeSet.ArtifactType), + EQUIPMENT("Equipment", SubTypeSet.ArtifactType), + FORTIFICATION("Fortification", SubTypeSet.ArtifactType), + TREASURE("Treasure", SubTypeSet.ArtifactType), + VEHICLE("Vehicle", SubTypeSet.ArtifactType), + // 205.3m : Creatures and tribals share their lists of subtypes; these subtypes are called creature types. // A - ADVISOR("Advisor", SubTypeSet.CreatureType, false), - AETHERBORN("Aetherborn", SubTypeSet.CreatureType, false), - ALLY("Ally", SubTypeSet.CreatureType, false), - ANGEL("Angel", SubTypeSet.CreatureType, false), - ANTELOPE("Antelope", SubTypeSet.CreatureType, false), + ADVISOR("Advisor", SubTypeSet.CreatureType), + AETHERBORN("Aetherborn", SubTypeSet.CreatureType), + ALLY("Ally", SubTypeSet.CreatureType), + ANGEL("Angel", SubTypeSet.CreatureType), + ANTELOPE("Antelope", SubTypeSet.CreatureType), AQUALISH("Aqualish", SubTypeSet.CreatureType, true), // Star Wars - APE("Ape", SubTypeSet.CreatureType, false), + APE("Ape", SubTypeSet.CreatureType), ARCONA("Arcona", SubTypeSet.CreatureType, true), - ARCHER("Archer", SubTypeSet.CreatureType, false), - ARCHON("Archon", SubTypeSet.CreatureType, false), - ARTIFICER("Artificer", SubTypeSet.CreatureType, false), + ARCHER("Archer", SubTypeSet.CreatureType), + ARCHON("Archon", SubTypeSet.CreatureType), + ARTIFICER("Artificer", SubTypeSet.CreatureType), ARTIFICIER("Artificier", SubTypeSet.CreatureType, true), - ASSASSIN("Assassin", SubTypeSet.CreatureType, false), - ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType, false), - ATOG("Atog", SubTypeSet.CreatureType, false), + ASSASSIN("Assassin", SubTypeSet.CreatureType), + ASSEMBLY_WORKER("Assembly-Worker", SubTypeSet.CreatureType), + ATOG("Atog", SubTypeSet.CreatureType), ATAT("AT-AT", SubTypeSet.CreatureType, true), - AUROCHS("Aurochs", SubTypeSet.CreatureType, false), + AUROCHS("Aurochs", SubTypeSet.CreatureType), AUTOBOT("Autobot", SubTypeSet.CreatureType, true), // H17, Grimlock - AVATAR("Avatar", SubTypeSet.CreatureType, false), + AVATAR("Avatar", SubTypeSet.CreatureType), // B - BADGER("Badger", SubTypeSet.CreatureType, false), - BARBARIAN("Barbarian", SubTypeSet.CreatureType, false), - BASILISK("Basilisk", SubTypeSet.CreatureType, false), - BAT("Bat", SubTypeSet.CreatureType, false), - BEAR("Bear", SubTypeSet.CreatureType, false), - BEAST("Beast", SubTypeSet.CreatureType, false), - BEEBLE("Beeble", SubTypeSet.CreatureType, false), - BERSERKER("Berserker", SubTypeSet.CreatureType, false), - BIRD("Bird", SubTypeSet.CreatureType, false), + BADGER("Badger", SubTypeSet.CreatureType), + BARBARIAN("Barbarian", SubTypeSet.CreatureType), + BASILISK("Basilisk", SubTypeSet.CreatureType), + BAT("Bat", SubTypeSet.CreatureType), + BEAR("Bear", SubTypeSet.CreatureType), + BEAST("Beast", SubTypeSet.CreatureType), + BEEBLE("Beeble", SubTypeSet.CreatureType), + BERSERKER("Berserker", SubTypeSet.CreatureType), + BIRD("Bird", SubTypeSet.CreatureType), BITH("Bith", SubTypeSet.CreatureType, true), // Star Wars - BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType, false), - BOAR("Boar", SubTypeSet.CreatureType, false), - BRINGER("Bringer", SubTypeSet.CreatureType, false), - BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType, false), + BLINKMOTH("Blinkmoth", SubTypeSet.CreatureType), + BOAR("Boar", SubTypeSet.CreatureType), + BRINGER("Bringer", SubTypeSet.CreatureType), + BRUSHWAGG("Brushwagg", SubTypeSet.CreatureType), // C CALAMARI("Calamari", SubTypeSet.CreatureType, true), // Star Wars - CAMARID("Camarid", SubTypeSet.CreatureType, false), - CAMEL("Camel", SubTypeSet.CreatureType, false), - CARIBOU("Caribou", SubTypeSet.CreatureType, false), - CARRIER("Carrier", SubTypeSet.CreatureType, false), - CAT("Cat", SubTypeSet.CreatureType, false), - CENTAUR("Centaur", SubTypeSet.CreatureType, false), + CAMARID("Camarid", SubTypeSet.CreatureType), + CAMEL("Camel", SubTypeSet.CreatureType), + CARIBOU("Caribou", SubTypeSet.CreatureType), + CARRIER("Carrier", SubTypeSet.CreatureType), + CAT("Cat", SubTypeSet.CreatureType), + CENTAUR("Centaur", SubTypeSet.CreatureType), CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars - CEPHALID("Cephalid", SubTypeSet.CreatureType, false), - CHIMERA("Chimera", SubTypeSet.CreatureType, false), + CEPHALID("Cephalid", SubTypeSet.CreatureType), + CHIMERA("Chimera", SubTypeSet.CreatureType), CHISS("Chiss", SubTypeSet.CreatureType, true), - CITIZEN("Citizen", SubTypeSet.CreatureType, false), - CLERIC("Cleric", SubTypeSet.CreatureType, false), - COCKATRICE("Cockatrice", SubTypeSet.CreatureType, false), - CONSTRUCT("Construct", SubTypeSet.CreatureType, false), - COWARD("Coward", SubTypeSet.CreatureType, false), - CRAB("Crab", SubTypeSet.CreatureType, false), - CROCODILE("Crocodile", SubTypeSet.CreatureType, false), + CITIZEN("Citizen", SubTypeSet.CreatureType), + CLERIC("Cleric", SubTypeSet.CreatureType), + COCKATRICE("Cockatrice", SubTypeSet.CreatureType), + CONSTRUCT("Construct", SubTypeSet.CreatureType), + COWARD("Coward", SubTypeSet.CreatureType), + CRAB("Crab", SubTypeSet.CreatureType), + CROCODILE("Crocodile", SubTypeSet.CreatureType), CYBORG("Cyborg", SubTypeSet.CreatureType, true), // Star Wars - CYCLOPS("Cyclops", SubTypeSet.CreatureType, false), + CYCLOPS("Cyclops", SubTypeSet.CreatureType), // D DATHOMIRIAN("Dathomirian", SubTypeSet.CreatureType, true), // Star Wars - DAUTHI("Dauthi", SubTypeSet.CreatureType, false), - DEMON("Demon", SubTypeSet.CreatureType, false), - DESERTER("Deserter", SubTypeSet.CreatureType, false), - DEVIL("Devil", SubTypeSet.CreatureType, false), - DINOSAUR("Dinosaur", SubTypeSet.CreatureType, false), // With Ixalan now being spoiled, need this to be selectable - DJINN("Djinn", SubTypeSet.CreatureType, false), - DRAGON("Dragon", SubTypeSet.CreatureType, false), - DRAKE("Drake", SubTypeSet.CreatureType, false), - DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType, false), - DRONE("Drone", SubTypeSet.CreatureType, false), - DRUID("Druid", SubTypeSet.CreatureType, false), + DAUTHI("Dauthi", SubTypeSet.CreatureType), + DEMON("Demon", SubTypeSet.CreatureType), + DESERTER("Deserter", SubTypeSet.CreatureType), + DEVIL("Devil", SubTypeSet.CreatureType), + DINOSAUR("Dinosaur", SubTypeSet.CreatureType), // With Ixalan now being spoiled, need this to be selectable + DJINN("Djinn", SubTypeSet.CreatureType), + DRAGON("Dragon", SubTypeSet.CreatureType), + DRAKE("Drake", SubTypeSet.CreatureType), + DREADNOUGHT("Dreadnought", SubTypeSet.CreatureType), + DRONE("Drone", SubTypeSet.CreatureType), + DRUID("Druid", SubTypeSet.CreatureType), DROID("Droid", SubTypeSet.CreatureType, true), // Star Wars - DRYAD("Dryad", SubTypeSet.CreatureType, false), - DWARF("Dwarf", SubTypeSet.CreatureType, false), + DRYAD("Dryad", SubTypeSet.CreatureType), + DWARF("Dwarf", SubTypeSet.CreatureType), // E - EFREET("Efreet", SubTypeSet.CreatureType, false), - ELDER("Elder", SubTypeSet.CreatureType, false), - ELDRAZI("Eldrazi", SubTypeSet.CreatureType, false), - ELEMENTAL("Elemental", SubTypeSet.CreatureType, false), - ELEPHANT("Elephant", SubTypeSet.CreatureType, false), - ELF("Elf", SubTypeSet.CreatureType, false), - ELK("Elk", SubTypeSet.CreatureType, false), - EYE("Eye", SubTypeSet.CreatureType, false), + EFREET("Efreet", SubTypeSet.CreatureType), + ELDER("Elder", SubTypeSet.CreatureType), + ELDRAZI("Eldrazi", SubTypeSet.CreatureType), + ELEMENTAL("Elemental", SubTypeSet.CreatureType), + ELEPHANT("Elephant", SubTypeSet.CreatureType), + ELF("Elf", SubTypeSet.CreatureType), + ELK("Elk", SubTypeSet.CreatureType), + EYE("Eye", SubTypeSet.CreatureType), EWOK("Ewok", SubTypeSet.CreatureType, true), // Star Wars // F - FAERIE("Faerie", SubTypeSet.CreatureType, false), - FERRET("Ferret", SubTypeSet.CreatureType, false), - FISH("Fish", SubTypeSet.CreatureType, false), - FLAGBEARER("Flagbearer", SubTypeSet.CreatureType, false), - FOX("Fox", SubTypeSet.CreatureType, false), - FROG("Frog", SubTypeSet.CreatureType, false), - FUNGUS("Fungus", SubTypeSet.CreatureType, false), + FAERIE("Faerie", SubTypeSet.CreatureType), + FERRET("Ferret", SubTypeSet.CreatureType), + FISH("Fish", SubTypeSet.CreatureType), + FLAGBEARER("Flagbearer", SubTypeSet.CreatureType), + FOX("Fox", SubTypeSet.CreatureType), + FROG("Frog", SubTypeSet.CreatureType), + FUNGUS("Fungus", SubTypeSet.CreatureType), // G GAMORREAN("Gamorrean", SubTypeSet.CreatureType, true), // Star Wars GAND("Gand", SubTypeSet.CreatureType, true), // Star Wars - GARGOYLE("Gargoyle", SubTypeSet.CreatureType, false), - GERM("Germ", SubTypeSet.CreatureType, false), - GIANT("Giant", SubTypeSet.CreatureType, false), - GNOME("Gnome", SubTypeSet.CreatureType, false), - GOLEM("Golem", SubTypeSet.CreatureType, false), - GOAT("Goat", SubTypeSet.CreatureType, false), - GOBLIN("Goblin", SubTypeSet.CreatureType, false), - GOD("God", SubTypeSet.CreatureType, false), - GORGON("Gorgon", SubTypeSet.CreatureType, false), - GRAVEBORN("Graveborn", SubTypeSet.CreatureType, false), - GREMLIN("Gremlin", SubTypeSet.CreatureType, false), - GRIFFIN("Griffin", SubTypeSet.CreatureType, false), + GARGOYLE("Gargoyle", SubTypeSet.CreatureType), + GERM("Germ", SubTypeSet.CreatureType), + GIANT("Giant", SubTypeSet.CreatureType), + GNOME("Gnome", SubTypeSet.CreatureType), + GOLEM("Golem", SubTypeSet.CreatureType), + GOAT("Goat", SubTypeSet.CreatureType), + GOBLIN("Goblin", SubTypeSet.CreatureType), + GOD("God", SubTypeSet.CreatureType), + GORGON("Gorgon", SubTypeSet.CreatureType), + GRAVEBORN("Graveborn", SubTypeSet.CreatureType), + GREMLIN("Gremlin", SubTypeSet.CreatureType), + GRIFFIN("Griffin", SubTypeSet.CreatureType), GUNGAN("Gungan", SubTypeSet.CreatureType, true), // Star Wars // H - HAG("Hag", SubTypeSet.CreatureType, false), - HARPY("Harpy", SubTypeSet.CreatureType, false), - HELLION("Hellion", SubTypeSet.CreatureType, false), - HIPPO("Hippo", SubTypeSet.CreatureType, false), - HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType, false), - HOMARID("Homarid", SubTypeSet.CreatureType, false), - HOMUNCULUS("Homunculus", SubTypeSet.CreatureType, false), - HORROR("Horror", SubTypeSet.CreatureType, false), - HORSE("Horse", SubTypeSet.CreatureType, false), - HOUND("Hound", SubTypeSet.CreatureType, false), - HUMAN("Human", SubTypeSet.CreatureType, false), - HUNTER("Hunter", SubTypeSet.CreatureType, false), + HAG("Hag", SubTypeSet.CreatureType), + HARPY("Harpy", SubTypeSet.CreatureType), + HELLION("Hellion", SubTypeSet.CreatureType), + HIPPO("Hippo", SubTypeSet.CreatureType), + HIPPOGRIFF("Hippogriff", SubTypeSet.CreatureType), + HOMARID("Homarid", SubTypeSet.CreatureType), + HOMUNCULUS("Homunculus", SubTypeSet.CreatureType), + HORROR("Horror", SubTypeSet.CreatureType), + HORSE("Horse", SubTypeSet.CreatureType), + HOUND("Hound", SubTypeSet.CreatureType), + HUMAN("Human", SubTypeSet.CreatureType), + HUNTER("Hunter", SubTypeSet.CreatureType), HUTT("Hutt", SubTypeSet.CreatureType, true), // Star Wars - HYDRA("Hydra", SubTypeSet.CreatureType, false), - HYENA("Hyena", SubTypeSet.CreatureType, false), + HYDRA("Hydra", SubTypeSet.CreatureType), + HYENA("Hyena", SubTypeSet.CreatureType), // I - ILLUSION("Illusion", SubTypeSet.CreatureType, false), - IMP("Imp", SubTypeSet.CreatureType, false), - INCARNATION("Incarnation", SubTypeSet.CreatureType, false), - INSECT("Insect", SubTypeSet.CreatureType, false), + ILLUSION("Illusion", SubTypeSet.CreatureType), + IMP("Imp", SubTypeSet.CreatureType), + INCARNATION("Incarnation", SubTypeSet.CreatureType), + INSECT("Insect", SubTypeSet.CreatureType), ITHORIAN("Ithorian", SubTypeSet.CreatureType, true), // Star Wars // J - JACKAL("Jackal", SubTypeSet.CreatureType, false), + JACKAL("Jackal", SubTypeSet.CreatureType), JAWA("Jawa", SubTypeSet.CreatureType, true), JEDI("Jedi", SubTypeSet.CreatureType, true), // Star Wars - JELLYFISH("Jellyfish", SubTypeSet.CreatureType, false), - JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType, false), + JELLYFISH("Jellyfish", SubTypeSet.CreatureType), + JUGGERNAUT("Juggernaut", SubTypeSet.CreatureType), // K KALEESH("Kaleesh", SubTypeSet.CreatureType, true), // Star Wars - KAVU("Kavu", SubTypeSet.CreatureType, false), + KAVU("Kavu", SubTypeSet.CreatureType), KELDOR("KelDor", SubTypeSet.CreatureType, true), - KIRIN("Kirin", SubTypeSet.CreatureType, false), - KITHKIN("Kithkin", SubTypeSet.CreatureType, false), - KNIGHT("Knight", SubTypeSet.CreatureType, false), - KOBOLD("Kobold", SubTypeSet.CreatureType, false), + KIRIN("Kirin", SubTypeSet.CreatureType), + KITHKIN("Kithkin", SubTypeSet.CreatureType), + KNIGHT("Knight", SubTypeSet.CreatureType), + KOBOLD("Kobold", SubTypeSet.CreatureType), KOORIVAR("Koorivar", SubTypeSet.CreatureType, true), - KOR("Kor", SubTypeSet.CreatureType, false), - KRAKEN("Kraken", SubTypeSet.CreatureType, false), + KOR("Kor", SubTypeSet.CreatureType), + KRAKEN("Kraken", SubTypeSet.CreatureType), // L - LAMIA("Lamia", SubTypeSet.CreatureType, false), - LAMMASU("Lammasu", SubTypeSet.CreatureType, false), - LEECH("Leech", SubTypeSet.CreatureType, false), - LEVIATHAN("Leviathan", SubTypeSet.CreatureType, false), - LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType, false), - LICID("Licid", SubTypeSet.CreatureType, false), - LIZARD("Lizard", SubTypeSet.CreatureType, false), + LAMIA("Lamia", SubTypeSet.CreatureType), + LAMMASU("Lammasu", SubTypeSet.CreatureType), + LEECH("Leech", SubTypeSet.CreatureType), + LEVIATHAN("Leviathan", SubTypeSet.CreatureType), + LHURGOYF("Lhurgoyf", SubTypeSet.CreatureType), + LICID("Licid", SubTypeSet.CreatureType), + LIZARD("Lizard", SubTypeSet.CreatureType), // M MANTELLIAN("Mantellian", SubTypeSet.CreatureType, true), // Star Wars - MANTICORE("Manticore", SubTypeSet.CreatureType, false), - MASTICORE("Masticore", SubTypeSet.CreatureType, false), - MERCENARY("Mercenary", SubTypeSet.CreatureType, false), - MERFOLK("Merfolk", SubTypeSet.CreatureType, false), - METATHRAN("Metathran", SubTypeSet.CreatureType, false), - MINION("Minion", SubTypeSet.CreatureType, false), - MINOTAUR("Minotaur", SubTypeSet.CreatureType, false), + MANTICORE("Manticore", SubTypeSet.CreatureType), + MASTICORE("Masticore", SubTypeSet.CreatureType), + MERCENARY("Mercenary", SubTypeSet.CreatureType), + MERFOLK("Merfolk", SubTypeSet.CreatureType), + METATHRAN("Metathran", SubTypeSet.CreatureType), + MINION("Minion", SubTypeSet.CreatureType), + MINOTAUR("Minotaur", SubTypeSet.CreatureType), MIRIALAN("Mirialan", SubTypeSet.CreatureType, true), // Star Wars - MOLE("Mole", SubTypeSet.CreatureType, false), - MONGER("Monger", SubTypeSet.CreatureType, false), - MONGOOSE("Mongoose", SubTypeSet.CreatureType, false), - MONK("Monk", SubTypeSet.CreatureType, false), - MONKEY("Monkey", SubTypeSet.CreatureType, false), - MOONFOLK("Moonfolk", SubTypeSet.CreatureType, false), - MUTANT("Mutant", SubTypeSet.CreatureType, false), - MYR("Myr", SubTypeSet.CreatureType, false), - MYSTIC("Mystic", SubTypeSet.CreatureType, false), + MOLE("Mole", SubTypeSet.CreatureType), + MONGER("Monger", SubTypeSet.CreatureType), + MONGOOSE("Mongoose", SubTypeSet.CreatureType), + MONK("Monk", SubTypeSet.CreatureType), + MONKEY("Monkey", SubTypeSet.CreatureType), + MOONFOLK("Moonfolk", SubTypeSet.CreatureType), + MUTANT("Mutant", SubTypeSet.CreatureType), + MYR("Myr", SubTypeSet.CreatureType), + MYSTIC("Mystic", SubTypeSet.CreatureType), // N - NAGA("Naga", SubTypeSet.CreatureType, false), - NAUTILUS("Nautilus", SubTypeSet.CreatureType, false), + NAGA("Naga", SubTypeSet.CreatureType), + NAUTILUS("Nautilus", SubTypeSet.CreatureType), NAUTOLAN("Nautolan", SubTypeSet.CreatureType, true), // Star Wars NEIMOIDIAN("Neimoidian", SubTypeSet.CreatureType, true), // Star Wars - NEPHILIM("Nephilim", SubTypeSet.CreatureType, false), - NIGHTMARE("Nightmare", SubTypeSet.CreatureType, false), - NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType, false), - NINJA("Ninja", SubTypeSet.CreatureType, false), - NOGGLE("Noggle", SubTypeSet.CreatureType, false), - NOMAD("Nomad", SubTypeSet.CreatureType, false), - NYMPH("Nymph", SubTypeSet.CreatureType, false), + NEPHILIM("Nephilim", SubTypeSet.CreatureType), + NIGHTMARE("Nightmare", SubTypeSet.CreatureType), + NIGHTSTALKER("Nightstalker", SubTypeSet.CreatureType), + NINJA("Ninja", SubTypeSet.CreatureType), + NOGGLE("Noggle", SubTypeSet.CreatureType), + NOMAD("Nomad", SubTypeSet.CreatureType), + NYMPH("Nymph", SubTypeSet.CreatureType), // O - OCTOPUS("Octopus", SubTypeSet.CreatureType, false), - OGRE("Ogre", SubTypeSet.CreatureType, false), - OOZE("Ooze", SubTypeSet.CreatureType, false), - ORB("Orb", SubTypeSet.CreatureType, false), - ORC("Orc", SubTypeSet.CreatureType, false), - ORGG("Orgg", SubTypeSet.CreatureType, false), + OCTOPUS("Octopus", SubTypeSet.CreatureType), + OGRE("Ogre", SubTypeSet.CreatureType), + OOZE("Ooze", SubTypeSet.CreatureType), + ORB("Orb", SubTypeSet.CreatureType), + ORC("Orc", SubTypeSet.CreatureType), + ORGG("Orgg", SubTypeSet.CreatureType), ORTOLAN("Ortolan", SubTypeSet.CreatureType, true), - OUPHE("Ouphe", SubTypeSet.CreatureType, false), - OX("Ox", SubTypeSet.CreatureType, false), - OYSTER("Oyster", SubTypeSet.CreatureType, false), + OUPHE("Ouphe", SubTypeSet.CreatureType), + OX("Ox", SubTypeSet.CreatureType), + OYSTER("Oyster", SubTypeSet.CreatureType), // P - PEGASUS("Pegasus", SubTypeSet.CreatureType, false), - PENTAVITE("Pentavite", SubTypeSet.CreatureType, false), - PEST("Pest", SubTypeSet.CreatureType, false), - PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType, false), - PHOENIX("Phoenix", SubTypeSet.CreatureType, false), - PILOT("Pilot", SubTypeSet.CreatureType, false), - PINCHER("Pincher", SubTypeSet.CreatureType, false), - PIRATE("Pirate", SubTypeSet.CreatureType, false), - PLANT("Plant", SubTypeSet.CreatureType, false), - PRAETOR("Praetor", SubTypeSet.CreatureType, false), - PRISM("Prism", SubTypeSet.CreatureType, false), - PROCESSOR("Processor", SubTypeSet.CreatureType, false), + PEGASUS("Pegasus", SubTypeSet.CreatureType), + PENTAVITE("Pentavite", SubTypeSet.CreatureType), + PEST("Pest", SubTypeSet.CreatureType), + PHELDDAGRIF("Phelddagrif", SubTypeSet.CreatureType), + PHOENIX("Phoenix", SubTypeSet.CreatureType), + PILOT("Pilot", SubTypeSet.CreatureType), + PINCHER("Pincher", SubTypeSet.CreatureType), + PIRATE("Pirate", SubTypeSet.CreatureType), + PLANT("Plant", SubTypeSet.CreatureType), + PRAETOR("Praetor", SubTypeSet.CreatureType), + PRISM("Prism", SubTypeSet.CreatureType), + PROCESSOR("Processor", SubTypeSet.CreatureType), PUREBLOOD("Pureblood", SubTypeSet.CreatureType, true), // Q QUARREN("Quarren", SubTypeSet.CreatureType, true), // Star Wars // R - RABBIT("Rabbit", SubTypeSet.CreatureType, false), - RAT("Rat", SubTypeSet.CreatureType, false), - REBEL("Rebel", SubTypeSet.CreatureType, false), - REFLECTION("Reflection", SubTypeSet.CreatureType, false), - RHINO("Rhino", SubTypeSet.CreatureType, false), - RIGGER("Rigger", SubTypeSet.CreatureType, false), + RABBIT("Rabbit", SubTypeSet.CreatureType), + RAT("Rat", SubTypeSet.CreatureType), + REBEL("Rebel", SubTypeSet.CreatureType), + REFLECTION("Reflection", SubTypeSet.CreatureType), + RHINO("Rhino", SubTypeSet.CreatureType), + RIGGER("Rigger", SubTypeSet.CreatureType), RODIAN("Rodian", SubTypeSet.CreatureType, true), // Star Wars - ROGUE("Rogue", SubTypeSet.CreatureType, false), + ROGUE("Rogue", SubTypeSet.CreatureType), // S - SABLE("Sable", SubTypeSet.CreatureType, false), - SALAMANDER("Salamander", SubTypeSet.CreatureType, false), - SAMURAI("Samurai", SubTypeSet.CreatureType, false), - SAND("Sand", SubTypeSet.CreatureType, false), - SAPROLING("Saproling", SubTypeSet.CreatureType, false), - SATYR("Satyr", SubTypeSet.CreatureType, false), - SCARECROW("Scarecrow", SubTypeSet.CreatureType, false), - SCION("Scion", SubTypeSet.CreatureType, false), - SCORPION("Scorpion", SubTypeSet.CreatureType, false), - SCOUT("Scout", SubTypeSet.CreatureType, false), - SERF("Serf", SubTypeSet.CreatureType, false), - SERPENT("Serpent", SubTypeSet.CreatureType, false), - SERVO("Servo", SubTypeSet.CreatureType, false), - SHADE("Shade", SubTypeSet.CreatureType, false), - SHAMAN("Shaman", SubTypeSet.CreatureType, false), - SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType, false), - SHEEP("Sheep", SubTypeSet.CreatureType, false), - SIREN("Siren", SubTypeSet.CreatureType, false), - SITH("Sith", SubTypeSet.CreatureType, false), - SKELETON("Skeleton", SubTypeSet.CreatureType, false), - SLITH("Slith", SubTypeSet.CreatureType, false), - SLIVER("Sliver", SubTypeSet.CreatureType, false), - SLUG("Slug", SubTypeSet.CreatureType, false), - SNAKE("Snake", SubTypeSet.CreatureType, false), - SOLDIER("Soldier", SubTypeSet.CreatureType, false), - SOLTARI("Soltari", SubTypeSet.CreatureType, false), - SPAWN("Spawn", SubTypeSet.CreatureType, false), - SPECTER("Specter", SubTypeSet.CreatureType, false), - SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType, false), - SPHINX("Sphinx", SubTypeSet.CreatureType, false), - SPIDER("Spider", SubTypeSet.CreatureType, false), - SPIKE("Spike", SubTypeSet.CreatureType, false), - SPIRIT("Spirit", SubTypeSet.CreatureType, false), - SPLITTER("Splitter", SubTypeSet.CreatureType, false), - SPONGE("Sponge", SubTypeSet.CreatureType, false), - SQUID("Squid", SubTypeSet.CreatureType, false), - SQUIRREL("Squirrel", SubTypeSet.CreatureType, false), - STARFISH("Starfish", SubTypeSet.CreatureType, false), + SABLE("Sable", SubTypeSet.CreatureType), + SALAMANDER("Salamander", SubTypeSet.CreatureType), + SAMURAI("Samurai", SubTypeSet.CreatureType), + SAND("Sand", SubTypeSet.CreatureType), + SAPROLING("Saproling", SubTypeSet.CreatureType), + SATYR("Satyr", SubTypeSet.CreatureType), + SCARECROW("Scarecrow", SubTypeSet.CreatureType), + SCION("Scion", SubTypeSet.CreatureType), + SCORPION("Scorpion", SubTypeSet.CreatureType), + SCOUT("Scout", SubTypeSet.CreatureType), + SERF("Serf", SubTypeSet.CreatureType), + SERPENT("Serpent", SubTypeSet.CreatureType), + SERVO("Servo", SubTypeSet.CreatureType), + SHADE("Shade", SubTypeSet.CreatureType), + SHAMAN("Shaman", SubTypeSet.CreatureType), + SHAPESHIFTER("Shapeshifter", SubTypeSet.CreatureType), + SHEEP("Sheep", SubTypeSet.CreatureType), + SIREN("Siren", SubTypeSet.CreatureType), + SITH("Sith", SubTypeSet.CreatureType), + SKELETON("Skeleton", SubTypeSet.CreatureType), + SLITH("Slith", SubTypeSet.CreatureType), + SLIVER("Sliver", SubTypeSet.CreatureType), + SLUG("Slug", SubTypeSet.CreatureType), + SNAKE("Snake", SubTypeSet.CreatureType), + SOLDIER("Soldier", SubTypeSet.CreatureType), + SOLTARI("Soltari", SubTypeSet.CreatureType), + SPAWN("Spawn", SubTypeSet.CreatureType), + SPECTER("Specter", SubTypeSet.CreatureType), + SPELLSHAPER("Spellshaper", SubTypeSet.CreatureType), + SPHINX("Sphinx", SubTypeSet.CreatureType), + SPIDER("Spider", SubTypeSet.CreatureType), + SPIKE("Spike", SubTypeSet.CreatureType), + SPIRIT("Spirit", SubTypeSet.CreatureType), + SPLITTER("Splitter", SubTypeSet.CreatureType), + SPONGE("Sponge", SubTypeSet.CreatureType), + SQUID("Squid", SubTypeSet.CreatureType), + SQUIRREL("Squirrel", SubTypeSet.CreatureType), + STARFISH("Starfish", SubTypeSet.CreatureType), STARSHIP("Starship", SubTypeSet.CreatureType, true), // Star Wars SULLUSTAN("Sullustan", SubTypeSet.CreatureType, true), // Star Wars - SURRAKAR("Surrakar", SubTypeSet.CreatureType, false), - SURVIVOR("Survivor", SubTypeSet.CreatureType, false), + SURRAKAR("Surrakar", SubTypeSet.CreatureType), + SURVIVOR("Survivor", SubTypeSet.CreatureType), // T - TETRAVITE("Tetravite", SubTypeSet.CreatureType, false), - THALAKOS("Thalakos", SubTypeSet.CreatureType, false), - THOPTER("Thopter", SubTypeSet.CreatureType, false), + TETRAVITE("Tetravite", SubTypeSet.CreatureType), + THALAKOS("Thalakos", SubTypeSet.CreatureType), + THOPTER("Thopter", SubTypeSet.CreatureType), TRANDOSHAN("Trandoshan", SubTypeSet.CreatureType, true), // Star Wars - THRULL("Thrull", SubTypeSet.CreatureType, false), - TREEFOLK("Treefolk", SubTypeSet.CreatureType, false), - TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType, false), - TROLL("Troll", SubTypeSet.CreatureType, false), - TURTLE("Turtle", SubTypeSet.CreatureType, false), + THRULL("Thrull", SubTypeSet.CreatureType), + TREEFOLK("Treefolk", SubTypeSet.CreatureType), + TRISKELAVITE("Triskelavite", SubTypeSet.CreatureType), + TROLL("Troll", SubTypeSet.CreatureType), + TURTLE("Turtle", SubTypeSet.CreatureType), TROOPER("Trooper", SubTypeSet.CreatureType, true), // Star Wars TWILEK("Twi'lek", SubTypeSet.CreatureType, true), // Star Wars // U UGNAUGHT("Ugnaught", SubTypeSet.CreatureType, true), - UNICORN("Unicorn", SubTypeSet.CreatureType, false), + UNICORN("Unicorn", SubTypeSet.CreatureType), //V - VAMPIRE("Vampire", SubTypeSet.CreatureType, false), - VEDALKEN("Vedalken", SubTypeSet.CreatureType, false), - VIASHINO("Viashino", SubTypeSet.CreatureType, false), - VOLVER("Volver", SubTypeSet.CreatureType, false), + VAMPIRE("Vampire", SubTypeSet.CreatureType), + VEDALKEN("Vedalken", SubTypeSet.CreatureType), + VIASHINO("Viashino", SubTypeSet.CreatureType), + VOLVER("Volver", SubTypeSet.CreatureType), //W - WALL("Wall", SubTypeSet.CreatureType, false), - WARRIOR("Warrior", SubTypeSet.CreatureType, false), + WALL("Wall", SubTypeSet.CreatureType), + WARRIOR("Warrior", SubTypeSet.CreatureType), WEEQUAY("Weequay", SubTypeSet.CreatureType, true), - WEIRD("Weird", SubTypeSet.CreatureType, false), - WEREWOLF("Werewolf", SubTypeSet.CreatureType, false), - WHALE("Whale", SubTypeSet.CreatureType, false), - WIZARD("Wizard", SubTypeSet.CreatureType, false), - WOLF("Wolf", SubTypeSet.CreatureType, false), - WOLVERINE("Wolverine", SubTypeSet.CreatureType, false), - WOMBAT("Wombat", SubTypeSet.CreatureType, false), + WEIRD("Weird", SubTypeSet.CreatureType), + WEREWOLF("Werewolf", SubTypeSet.CreatureType), + WHALE("Whale", SubTypeSet.CreatureType), + WIZARD("Wizard", SubTypeSet.CreatureType), + WOLF("Wolf", SubTypeSet.CreatureType), + WOLVERINE("Wolverine", SubTypeSet.CreatureType), + WOMBAT("Wombat", SubTypeSet.CreatureType), WOOKIEE("Wookiee", SubTypeSet.CreatureType, true), // Star Wars - WORM("Worm", SubTypeSet.CreatureType, false), - WRAITH("Wraith", SubTypeSet.CreatureType, false), - WURM("Wurm", SubTypeSet.CreatureType, false), + WORM("Worm", SubTypeSet.CreatureType), + WRAITH("Wraith", SubTypeSet.CreatureType), + WURM("Wurm", SubTypeSet.CreatureType), // Y - YETI("Yeti", SubTypeSet.CreatureType, false), + YETI("Yeti", SubTypeSet.CreatureType), // Z ZABRAK("Zabrak", SubTypeSet.CreatureType, true), // Star Wars - ZOMBIE("Zombie", SubTypeSet.CreatureType, false), - ZUBERA("Zubera", SubTypeSet.CreatureType, false), + ZOMBIE("Zombie", SubTypeSet.CreatureType), + ZUBERA("Zubera", SubTypeSet.CreatureType), // Planeswalker - AJANI("Ajani", SubTypeSet.PlaneswalkerType, false), - ARLINN("Arlinn", SubTypeSet.PlaneswalkerType, false), - ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType, false), + AJANI("Ajani", SubTypeSet.PlaneswalkerType), + ARLINN("Arlinn", SubTypeSet.PlaneswalkerType), + ASHIOK("Ashiok", SubTypeSet.PlaneswalkerType), AURRA("Aurra", SubTypeSet.PlaneswalkerType, true), // Star Wars - BOLAS("Bolas", SubTypeSet.PlaneswalkerType, false), - CHANDRA("Chandra", SubTypeSet.PlaneswalkerType, false), - DACK("Dack", SubTypeSet.PlaneswalkerType, false), - DARETTI("Daretti", SubTypeSet.PlaneswalkerType, false), - DOMRI("Domri", SubTypeSet.PlaneswalkerType, false), + BOLAS("Bolas", SubTypeSet.PlaneswalkerType), + CHANDRA("Chandra", SubTypeSet.PlaneswalkerType), + DACK("Dack", SubTypeSet.PlaneswalkerType), + DARETTI("Daretti", SubTypeSet.PlaneswalkerType), + DOMRI("Domri", SubTypeSet.PlaneswalkerType), DOOKU("Dooku", SubTypeSet.PlaneswalkerType, true), // Star Wars - DOVIN("Dovin", SubTypeSet.PlaneswalkerType, false), - ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType, false), - FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType, false), - GARRUK("Garruk", SubTypeSet.PlaneswalkerType, false), - GIDEON("Gideon", SubTypeSet.PlaneswalkerType, false), - HUATLI("Huatli", SubTypeSet.PlaneswalkerType, false), - JACE("Jace", SubTypeSet.PlaneswalkerType, false), - KARN("Karn", SubTypeSet.PlaneswalkerType, false), - KAYA("Kaya", SubTypeSet.PlaneswalkerType, false), - KIORA("Kiora", SubTypeSet.PlaneswalkerType, false), - KOTH("Koth", SubTypeSet.PlaneswalkerType, false), - LILIANA("Liliana", SubTypeSet.PlaneswalkerType, false), - NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType, false), - NARSET("Narset", SubTypeSet.PlaneswalkerType, false), - NISSA("Nissa", SubTypeSet.PlaneswalkerType, false), - NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType, false), + DOVIN("Dovin", SubTypeSet.PlaneswalkerType), + ELSPETH("Elspeth", SubTypeSet.PlaneswalkerType), + FREYALISE("Freyalise", SubTypeSet.PlaneswalkerType), + GARRUK("Garruk", SubTypeSet.PlaneswalkerType), + GIDEON("Gideon", SubTypeSet.PlaneswalkerType), + HUATLI("Huatli", SubTypeSet.PlaneswalkerType), + JACE("Jace", SubTypeSet.PlaneswalkerType), + KARN("Karn", SubTypeSet.PlaneswalkerType), + KAYA("Kaya", SubTypeSet.PlaneswalkerType), + KIORA("Kiora", SubTypeSet.PlaneswalkerType), + KOTH("Koth", SubTypeSet.PlaneswalkerType), + LILIANA("Liliana", SubTypeSet.PlaneswalkerType), + NAHIRI("Nahiri", SubTypeSet.PlaneswalkerType), + NARSET("Narset", SubTypeSet.PlaneswalkerType), + NISSA("Nissa", SubTypeSet.PlaneswalkerType), + NIXILIS("Nixilis", SubTypeSet.PlaneswalkerType), OBI_WAN("Obi-Wan", SubTypeSet.PlaneswalkerType, true), // Star Wars - RAL("Ral", SubTypeSet.PlaneswalkerType, false), - SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType, false), - SAMUT("Samut", SubTypeSet.PlaneswalkerType, false), - SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType, false), + RAL("Ral", SubTypeSet.PlaneswalkerType), + SAHEELI("Saheeli", SubTypeSet.PlaneswalkerType), + SAMUT("Samut", SubTypeSet.PlaneswalkerType), + SARKHAN("Sarkhan", SubTypeSet.PlaneswalkerType), SIDIOUS("Sidious", SubTypeSet.PlaneswalkerType, true), // Star Wars - SORIN("Sorin", SubTypeSet.PlaneswalkerType, false), - TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType, false), - TEFERI("Teferi", SubTypeSet.PlaneswalkerType, false), - TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType, false), - TIBALT("Tibalt", SubTypeSet.PlaneswalkerType, false), - UGIN("Ugin", SubTypeSet.PlaneswalkerType, false), - VENSER("Venser", SubTypeSet.PlaneswalkerType, false), - VRASKA("Vraska", SubTypeSet.PlaneswalkerType, false), - XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType, false), + SORIN("Sorin", SubTypeSet.PlaneswalkerType), + TAMIYO("Tamiyo", SubTypeSet.PlaneswalkerType), + TEFERI("Teferi", SubTypeSet.PlaneswalkerType), + TEZZERET("Tezzeret", SubTypeSet.PlaneswalkerType), + TIBALT("Tibalt", SubTypeSet.PlaneswalkerType), + UGIN("Ugin", SubTypeSet.PlaneswalkerType), + VENSER("Venser", SubTypeSet.PlaneswalkerType), + VRASKA("Vraska", SubTypeSet.PlaneswalkerType), + XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType), YODA("Yoda", SubTypeSet.PlaneswalkerType, true); // Star Wars private final SubTypeSet subTypeSet; + SubType(String description, SubTypeSet subTypeSet) { + this(description, subTypeSet, false); + } + + SubType(String description, SubTypeSet subTypeSet, boolean customSet) { + this.description = description; + this.subTypeSet = subTypeSet; + this.customSet = customSet; + } + public String getDescription() { return description; } @@ -404,12 +418,6 @@ public enum SubType { return description; } - SubType(String description, SubTypeSet subTypeSet, boolean customSet) { - this.description = description; - this.subTypeSet = subTypeSet; - this.customSet = customSet; - } - public static SubType byDescription(String subType) { for (SubType s : values()) { if (s.getDescription().equals(subType)) { @@ -434,7 +442,10 @@ public enum SubType { } public static Set getBasicLands(boolean customSet) { - return Arrays.stream(values()).filter(s -> s.customSet == customSet).filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType).collect(Collectors.toSet()); + return Arrays.stream(values()) + .filter(p -> p.getSubTypeSet() == SubTypeSet.BasicLandType) + .filter(s -> s.customSet == customSet) + .collect(Collectors.toSet()); } public static SubTypeList getLandTypes(boolean customSet) { diff --git a/Mage/src/main/java/mage/util/SubTypeList.java b/Mage/src/main/java/mage/util/SubTypeList.java index 71d920983d..8f90b17a8b 100644 --- a/Mage/src/main/java/mage/util/SubTypeList.java +++ b/Mage/src/main/java/mage/util/SubTypeList.java @@ -1,20 +1,27 @@ package mage.util; -import mage.constants.SubType; - import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; +import mage.constants.SubType; + public class SubTypeList extends ArrayList { + @Deprecated public boolean addAll(List subtypes) { - return addAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); + return addAll(subtypes.stream() + .map(SubType::byDescription) + .collect(Collectors.toList())); } + @Deprecated public boolean removeAll(List subtypes){ - return removeAll(subtypes.stream().map(SubType::byDescription).collect(Collectors.toList())); + return removeAll(subtypes.stream() + .map(SubType::byDescription) + .collect(Collectors.toList())); } @@ -22,10 +29,17 @@ public class SubTypeList extends ArrayList { return Collections.addAll(this, subTypes); } + public boolean removeAll(SubType... subTypes) { + return super.removeAll(Arrays.stream(subTypes) + .collect(Collectors.toList())); + } + + @Deprecated public boolean add(String s) { return add(SubType.byDescription(s)); } + @Deprecated public boolean contains(String s) { return contains(SubType.byDescription(s)); }