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