-
Notifications
You must be signed in to change notification settings - Fork 2
Filters
Filters are essential to controlling the movement of the crawler through Matches and Summoners, as well as in restricting the data sent to the OutputHandler.
There are two main filters:
- SummonerFilter - Filters an Orianna core Summoner object.
- MatchFilter - Filters an Orianna core Match object.
Both SummonerFilters and MatchFilters are GhostFilters. A GhostFilter is a MemorisingFilter, which overrides the MemorisingFilter's apply
method to firstly check whether the incoming GhostObject exists. If not, it's instantly rejected by the filter, otherwise the filter proceeds to be applied.
One may define their own Filter
by implementing its filter
method, predicating the input object of the filter's type.
Since SummonerFilter
and MatchFilter
both only have their filter
method unimplemented, it's the only method one must implement to obtain a fully functioning filter.
Below is an example for constructing your own SummonerFilter:
public class ExampleFilter extends SummonerFilter {
public boolean filter(Summoner s) {
// predicate the input Summoner here
}
}
and similarly constructing your own MatchFilter:
public class ExampleFilter extends MatchFilter {
public boolean filter(Match m) {
// predicate the input Match here
}
}
Contained within presets/summonerfilters
and presets/matchfilters
, one may find preset SummonerFilter
s and MatchFilter
s.
-
AllowAllSummonerFilter
- simply returns true in the predicate for the SummonerFilter - accepts any input Summoner. -
LevelSummonerFilter
- accepts all Summoners that are level 30 and above, and rejects all Summoners below level 30. -
EloSummonerFilter
- predicates Summoners based upon whether theirRank
obtained from aSummonerEloEstimator
belongs to a set of input "allowed" ranks. If it does, the Summoner is accepted by the filter, otherwise it's rejected. Refer to Estimators wiki page for more information onSummonerEloEstimator
s.