com.github.dakusui.floorplan.resolver.ResolverEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of floorplan Show documentation
Show all versions of floorplan Show documentation
A library to model a heterogeneous and distributed software
system for testing
package com.github.dakusui.floorplan.resolver;
import com.github.dakusui.floorplan.component.Attribute;
import com.github.dakusui.floorplan.component.Ref;
import java.util.function.BiPredicate;
import static com.github.dakusui.floorplan.utils.Checks.requireNonNull;
public class ResolverEntry {
public final BiPredicate cond;
public final Resolver resolver;
private final Attribute keyAttribute;
public ResolverEntry(Attribute keyAttribute, BiPredicate cond, Resolver resolver) {
this.keyAttribute = requireNonNull(keyAttribute);
this.cond = cond;
this.resolver = resolver;
}
public Attribute key() {
return this.keyAttribute;
}
public String toString() {
return String.format("when:%s resolveTo:%s", this.cond, this.resolver);
}
}