public class HierarchicalTier extends Tier
Tier
that works similarly to a LinkedList
in that it has a parent tier
and will validate the pokemon against that first.
If it fails to validate the parent then it won't check it against the current specConstructor and Description |
---|
HierarchicalTier(java.lang.String id,
boolean ban,
PokemonSpecification... specs)
Initializes a new tier
|
HierarchicalTier(java.lang.String id,
boolean ban,
Tier tierAbove,
PokemonSpecification... specs)
Initializes a new tier
|
Modifier and Type | Method and Description |
---|---|
boolean |
validateSingle(Pokemon pokemon)
The logic executed here is -
When ban is true: if a single spec matches return false (i.e.
|
getTierDescription
compareTo, decodeInto, encodeInto, equals, getDescription, getID, getLocalizedName, getLocalizedName, hashCode, setDescription, toString, validateTeam
public HierarchicalTier(java.lang.String id, boolean ban, PokemonSpecification... specs)
id
- The id of the tier/battle clauseban
- If the tier is a ban listspecs
- The specs checked for this ban listpublic HierarchicalTier(java.lang.String id, boolean ban, Tier tierAbove, PokemonSpecification... specs)
id
- The id of the tier/battle clauseban
- If the tier is a ban listtierAbove
- The parent tier of this tierspecs
- The specs checked for this ban listpublic boolean validateSingle(Pokemon pokemon)
Tier
validateSingle
in class Tier
pokemon
- The Pokémon to check.