io.microconfig.core.environments.ComponentsImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of microconfig-core Show documentation
Show all versions of microconfig-core Show documentation
Powerful tool for microservice configuration management
package io.microconfig.core.environments;
import io.microconfig.core.configtypes.ConfigTypeFilter;
import io.microconfig.core.properties.Properties;
import io.microconfig.core.properties.PropertiesFactory;
import lombok.EqualsAndHashCode;
import lombok.RequiredArgsConstructor;
import java.util.List;
import static io.microconfig.utils.StreamUtils.forEach;
@EqualsAndHashCode
@RequiredArgsConstructor
public class ComponentsImpl implements Components {
private final List components;
private final PropertiesFactory propertiesFactory;
@Override
public List asList() {
return components;
}
@Override
public Properties getPropertiesFor(ConfigTypeFilter configType) {
return propertiesFactory.flat(
forEach(components.parallelStream(), c -> c.getPropertiesFor(configType))
);
}
@Override
public String toString() {
return components.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy