io.sphere.sdk.expansion.ExpansionDslUtil Maven / Gradle / Ivy
package io.sphere.sdk.expansion;
import java.util.Collections;
import java.util.function.Function;
import static io.sphere.sdk.utils.ListUtils.listOf;
public final class ExpansionDslUtil {
private ExpansionDslUtil() {
}
public static C plusExpansionPaths(final MetaModelExpansionDslExpansionModelRead meta, final Function> m) {
return meta.plusExpansionPaths(m.apply(meta.expansionModel()));
};
public static C withExpansionPaths(final MetaModelExpansionDslExpansionModelRead meta, final Function> m) {
return meta.withExpansionPaths(Collections.singletonList(m.apply(meta.expansionModel())));
}
public static C plusExpansionPaths(final MetaModelExpansionDslExpansionModelRead meta, final ExpansionPath expansionPath) {
return meta.withExpansionPaths(listOf(meta.expansionPaths(), expansionPath));
}
public static C withExpansionPaths(final MetaModelExpansionDslExpansionModelRead meta, final ExpansionPath expansionPath) {
return meta.withExpansionPaths(Collections.singletonList(expansionPath));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy