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