
cloud.prefab.client.config.ConfigElement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prefab-cloud-java Show documentation
Show all versions of prefab-cloud-java Show documentation
API Client for https://prefab.cloud: rate limits, feature flags and semaphores as a service
The newest version!
package cloud.prefab.client.config;
import cloud.prefab.domain.Prefab;
import java.util.stream.Stream;
public class ConfigElement {
private Prefab.Config config;
private Provenance provenance;
public ConfigElement(Prefab.Config config, Provenance provenance) {
this.config = config;
this.provenance = provenance;
}
public Prefab.Config getConfig() {
return config;
}
public Provenance getProvenance() {
return provenance;
}
public Stream getRowsProjEnvFirst(long projectEnvId) {
return config
.getRowsList()
.stream()
.filter(cr -> !cr.hasProjectEnvId() || cr.getProjectEnvId() == projectEnvId)
.sorted((o1, o2) -> o1.hasProjectEnvId() ? -1 : 1);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy