io.getunleash.repository.FeatureCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unleash-client-java Show documentation
Show all versions of unleash-client-java Show documentation
A client library for Unleash
The newest version!
package io.getunleash.repository;
import io.getunleash.FeatureToggle;
import io.getunleash.Segment;
import java.util.Collections;
public final class FeatureCollection {
private final ToggleCollection toggleCollection;
private final SegmentCollection segmentCollection;
public FeatureCollection() {
this(
new ToggleCollection(Collections.emptyList()),
new SegmentCollection(Collections.emptyList()));
}
public FeatureCollection(
ToggleCollection toggleCollection, SegmentCollection segmentCollection) {
this.toggleCollection = toggleCollection;
this.segmentCollection = segmentCollection;
}
public ToggleCollection getToggleCollection() {
return toggleCollection;
}
public SegmentCollection getSegmentCollection() {
return segmentCollection;
}
public FeatureToggle getToggle(String name) {
return toggleCollection.getToggle(name);
}
public Segment getSegment(int id) {
return segmentCollection.getSegment(id);
}
}