de.eventhorizongilde.ehfs.milestone.filter
Class Filters

java.lang.Object
  extended by de.eventhorizongilde.ehfs.milestone.filter.Filters

public final class Filters
extends Object

Contains convenience methods for creating filters.


Method Summary
static AbstractUnitFilter affiliation(EventUnit eventUnit, boolean raidMember)
          Creates a filter that matches if the specified event unit is a raid member (or not.)
static IEventFilter all()
          Creates a filter that always matches.
static IEventFilter and(IEventFilter... filters)
          Creates a conjunction (logical AND) of filters.
static IEventFilter and(List<IEventFilter> filters)
          Creates a conjunction (logical AND) of filters.
static IEventFilter aura(boolean added, int... spellIds)
          Creates a filter that matches if the fight event describes an aura having been gained (or faded.)
static IEventFilter eventType(Class<? extends CombatEvent> eventClass)
          Creates a filter that matches types of fight events.
static IEventFilter fightEnded()
          Creates a filter that matches when a fight has ended.
static AbstractUnitFilter mob(EventUnit eventUnit)
          Creates a filter that matches when the specified event unit is a mob (or NPC.)
static IEventFilter mobSpell(Class<? extends AbstractSpellEvent> eventClass, EventUnit eventUnit, int spellId)
          Creates a filter that matches when the specified event unit is a mob (or NPC), the fight event is of a specific type, and the specified spell is involved in the event.
static IEventFilter not(IEventFilter filter)
          Creates a filter that matches if the specified filter does not match (logical NOT.)
static AbstractUnitFilter npc(EventUnit eventUnit, int... npcIds)
          Creates a filter that matches if the specified event unit is one of the specified NPCs.
static AbstractUnitFilter npc(EventUnit eventUnit, int npcId)
          Creates a filter that matches if the specified event unit is a specific NPC.
static IEventFilter or(IEventFilter... filters)
          Creates a disjunction (logical OR) of filters.
static IEventFilter or(List<IEventFilter> filters)
          Creates a disjunction (logical OR) of filters.
static AbstractUnitFilter player(EventUnit eventUnit)
          Creates a filter that matches when the specified event unit is a player.
static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass, EventUnit eventUnit, int... spellIds)
           
static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass, EventUnit eventUnit, int spellId)
          Deprecated. Use playerSpell(Class, EventUnit, int...) instead.
static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass, EventUnit eventUnit, int spellId, int spellId2)
          Deprecated. Use playerSpell(Class, EventUnit, int...) instead.
static IEventFilter spell(int... spellIds)
          Creates a filter that matches if any of the specified spells are involved in a fight event.
static AbstractUnitFilter unitType(EventUnit eventUnit, IUnit.Type type)
          Creates a filter that matches if the specified event unit is of a specific type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

and

public static IEventFilter and(IEventFilter... filters)
Creates a conjunction (logical AND) of filters. The filter returned by this method only matches if all of the specified filters match.


and

public static IEventFilter and(List<IEventFilter> filters)
Creates a conjunction (logical AND) of filters. The filter returned by this method only matches if all of the specified filters match.


or

public static IEventFilter or(IEventFilter... filters)
Creates a disjunction (logical OR) of filters. The filter returned by this method matches if any of the specified filters match.


or

public static IEventFilter or(List<IEventFilter> filters)
Creates a disjunction (logical OR) of filters. The filter returned by this method matches if any of the specified filters match.


eventType

public static IEventFilter eventType(Class<? extends CombatEvent> eventClass)
Creates a filter that matches types of fight events.


mob

public static AbstractUnitFilter mob(EventUnit eventUnit)
Creates a filter that matches when the specified event unit is a mob (or NPC.)


mobSpell

public static IEventFilter mobSpell(Class<? extends AbstractSpellEvent> eventClass,
                                    EventUnit eventUnit,
                                    int spellId)
Creates a filter that matches when the specified event unit is a mob (or NPC), the fight event is of a specific type, and the specified spell is involved in the event.


not

public static IEventFilter not(IEventFilter filter)
Creates a filter that matches if the specified filter does not match (logical NOT.)


all

public static IEventFilter all()
Creates a filter that always matches.


player

public static AbstractUnitFilter player(EventUnit eventUnit)
Creates a filter that matches when the specified event unit is a player.


playerSpell

@Deprecated
public static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass,
                                                  EventUnit eventUnit,
                                                  int spellId)
Deprecated. Use playerSpell(Class, EventUnit, int...) instead.

Creates a filter that matches when the specified event unit is a player, the fight event is of a specific type, and the specified spell is involved in the event.


playerSpell

@Deprecated
public static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass,
                                                  EventUnit eventUnit,
                                                  int spellId,
                                                  int spellId2)
Deprecated. Use playerSpell(Class, EventUnit, int...) instead.

Creates a filter that matches when the specified event unit is a player, the fight event is of a specific type, and any of the specified spells are involved in the event.


playerSpell

public static IEventFilter playerSpell(Class<? extends AbstractSpellEvent> eventClass,
                                       EventUnit eventUnit,
                                       int... spellIds)

spell

public static IEventFilter spell(int... spellIds)
Creates a filter that matches if any of the specified spells are involved in a fight event.


affiliation

public static AbstractUnitFilter affiliation(EventUnit eventUnit,
                                             boolean raidMember)
Creates a filter that matches if the specified event unit is a raid member (or not.)


unitType

public static AbstractUnitFilter unitType(EventUnit eventUnit,
                                          IUnit.Type type)
Creates a filter that matches if the specified event unit is of a specific type.


npc

public static AbstractUnitFilter npc(EventUnit eventUnit,
                                     int npcId)
Creates a filter that matches if the specified event unit is a specific NPC.


npc

public static AbstractUnitFilter npc(EventUnit eventUnit,
                                     int... npcIds)
Creates a filter that matches if the specified event unit is one of the specified NPCs.


aura

public static IEventFilter aura(boolean added,
                                int... spellIds)
Creates a filter that matches if the fight event describes an aura having been gained (or faded.) The filter matches if any of the spell IDs match.

Parameters:
added - true if an aura gain should be matched, false for fading
spellIds - the spell ID(s) of the aura(s)

fightEnded

public static IEventFilter fightEnded()
Creates a filter that matches when a fight has ended.



Event Horizon Fight Statistics