com.kenshoo.pl.entity.FeatureSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence-layer Show documentation
Show all versions of persistence-layer Show documentation
A Java persistence layer based on JOOQ for high performance and business flow support.
package com.kenshoo.pl.entity;
import com.google.common.collect.ImmutableList;
import org.jooq.lambda.Seq;
import static java.util.Collections.emptyList;
public class FeatureSet {
private final ImmutableList features;
public final static FeatureSet EMPTY = new FeatureSet(emptyList());
public FeatureSet(Iterable features) {
this.features = ImmutableList.copyOf(features);
}
public FeatureSet(Feature... features) {
this(Seq.of(features));
}
public boolean isEnabled(Feature feature) {
return features.contains(feature);
}
}