Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
IterationsNumber.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.user.test.configurations.termination.auxiliary;
2 
6 public final class IterationsNumber {
7  private final long iterationsNumber;
8 
9  private IterationsNumber(long iterationsNumber) {
10  if (iterationsNumber <= 0) {
11  throw new IllegalArgumentException(
12  String.format("Iterations number must be > 0. Provided value is %s", iterationsNumber));
13  }
14  this.iterationsNumber = iterationsNumber;
15  }
16 
17  public static IterationsNumber of(long iterationsNumber) {
18  return new IterationsNumber(iterationsNumber);
19  }
20 
21  public long value() {
22  return iterationsNumber;
23  }
24 }