java.lang.Object
net.demilich.metastone.game.spells.desc.filter.EntityFilter
net.demilich.metastone.game.spells.desc.filter.AndFilter
All Implemented Interfaces:
java.io.Serializable, HasDesc<EntityFilterDesc>

public class AndFilter
extends EntityFilter
Evaluates to true for every target if all of the filters in EntityFilterArg.FILTERS also evaluate to true for the target.

If EntityFilterArg.FILTERS is empty, evaluates to true.

See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • create

      public static AndFilter create()
    • create

      public static AndFilter create​(EntityFilter... filters)
    • test

      protected boolean test​(GameContext context, Player player, Entity entity, Entity host)
      Description copied from class: EntityFilter
      The subclasses of this class implement this method to actually perform the logic of the filtering. Observe that results from filtering other entities are not available here; this function is stateless in the sense that an earlier acceptance or rejection of an entity cannot influence the acceptance or rejection of a current entity.
      Specified by:
      test in class EntityFilter
      Returns: