Jagger
 All Classes Namespaces Files Functions Variables Groups Pages
JLimitVsRefValue.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations.limits;
2 
3 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.RefValue;
4 
5 import java.util.Objects;
6 
10 public class JLimitVsRefValue extends JLimit {
11 
12  private Double refValue;
13 
14 
16  super(builder);
17  this.refValue = builder.refValue.value();
18  }
19 
20  public static Builder builder(String metricName, RefValue refValue) {
21  return new Builder(metricName, refValue);
22  }
23 
24 
25  public static class Builder extends JLimit.Builder {
26  private RefValue refValue;
27 
28  private Builder(String metricName, RefValue refValue) {
29  Objects.requireNonNull(metricName);
30  Objects.requireNonNull(refValue);
31 
32  this.metricName = metricName;
33  this.refValue = refValue;
34  }
35 
36  @Override
37  public JLimit build() {
38  return new JLimitVsRefValue(this);
39  }
40 
41  }
42 
43 
44  public Double getRefValue() {
45  return refValue;
46  }
47 }