1 package com.atlassian.sal.api.features;
2
3 import com.google.common.base.Predicate;
4
5 import javax.annotation.Nullable;
6
7
8
9
10 public class FeatureKeyClassifierPredicate implements Predicate<FeatureKeyScope>
11 {
12 private final FeatureKeyScope classifier;
13
14 public FeatureKeyClassifierPredicate(final FeatureKeyScope classifier)
15 {
16 this.classifier = classifier;
17 }
18
19 public static FeatureKeyClassifierPredicate filterBy(final FeatureKeyScope classifier)
20 {
21 return new FeatureKeyClassifierPredicate(classifier);
22 }
23
24 @Override
25 public boolean apply(@Nullable final FeatureKeyScope input)
26 {
27 return input != null && input == classifier;
28 }
29 }