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 FeatureKeyScopePredicate implements Predicate<FeatureKeyScope>
11 {
12 private final FeatureKeyScope featureKeyScope;
13
14 public FeatureKeyScopePredicate(final FeatureKeyScope featureKeyScope)
15 {
16 this.featureKeyScope = featureKeyScope;
17 }
18
19 public static FeatureKeyScopePredicate filterBy(final FeatureKeyScope featureKeyScope)
20 {
21 return new FeatureKeyScopePredicate(featureKeyScope);
22 }
23
24 @Override
25 public boolean apply(@Nullable final FeatureKeyScope input)
26 {
27 return input != null && input == featureKeyScope;
28 }
29 }