All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dakusui.floorplan.resolver.ResolverEntry Maven / Gradle / Ivy

Go to download

A library to model a heterogeneous and distributed software system for testing

There is a newer version: 5.1.1
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy