cloud.prefab.client.value.LiveString 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.value;
import cloud.prefab.client.ConfigClient;
import cloud.prefab.domain.Prefab;
import java.util.Optional;
public class LiveString extends AbstractLiveValue {
public LiveString(ConfigClient configClient, String key) {
super(configClient, key);
}
@Override
public Optional resolve(Prefab.ConfigValue value) {
if (value.hasString()) {
return Optional.of(value.getString());
} else {
return Optional.empty();
}
}
}