// Path: src/main/java/com/cloudera/director/spi/v2/util/Preconditions.java
// public static void checkArgument(
//     boolean expression, Object message) {
//   if (!expression) {
//     throw new IllegalArgumentException(String.valueOf(message));
//   }
// }
// 
// Path: src/main/java/com/cloudera/director/spi/v2/util/Preconditions.java
// public static <T> T checkNotNull(T instance, String message) {
//   if (instance == null) {
//     throw new NullPointerException(message);
//   }
//   return instance;
// }


import static com.cloudera.director.spi.v2.util.Preconditions.checkArgument;
import static com.cloudera.director.spi.v2.util.Preconditions.checkNotNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
   *                                 should be used for a domain
   */
  @SuppressWarnings("PMD.UselessParentheses")
  public HttpProxyParameters(String host, int port, String username,
      String password, String domain, String workstation,
      boolean preemptiveBasicProxyAuth, List<String> proxyBypassHosts) {
    this.host = host;
    this.port = port;

    checkArgument((host == null) || (this.port > 0 && this.port < 65536),
        "The supplied port must be a positive number less than 65536");

    this.username = username;
    this.password = password;

    checkArgument((username == null) == (password == null),
        "Both the proxy username and password must be supplied");
    checkArgument((host != null) || (username == null),
        "A host and port must be supplied with a username and password");

    this.domain = domain;
    this.workstation = workstation;

    checkArgument((domain == null) == (workstation == null),
        "Both the proxy domain and workstation must be supplied");
    checkArgument((username != null) || (domain == null),
        "NTLM requires a username, password, domain, and workstation to be supplied.");

    this.preemptiveBasicProxyAuth = preemptiveBasicProxyAuth;

// Path: src/main/java/com/cloudera/director/spi/v2/util/Preconditions.java
// public static void checkArgument(
//     boolean expression, Object message) {
//   if (!expression) {
//     throw new IllegalArgumentException(String.valueOf(message));
//   }
// }
// 
// Path: src/main/java/com/cloudera/director/spi/v2/util/Preconditions.java
// public static <T> T checkNotNull(T instance, String message) {
//   if (instance == null) {
//     throw new NullPointerException(message);
//   }
//   return instance;
// }


// Path: src/main/java/com/cloudera/director/spi/v2/common/http/HttpProxyParameters.java
import static com.cloudera.director.spi.v2.util.Preconditions.checkArgument;
import static com.cloudera.director.spi.v2.util.Preconditions.checkNotNull;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

   *                                 should be used for a domain
   */
  @SuppressWarnings("PMD.UselessParentheses")
  public HttpProxyParameters(String host, int port, String username,
      String password, String domain, String workstation,
      boolean preemptiveBasicProxyAuth, List<String> proxyBypassHosts) {
    this.host = host;
    this.port = port;

    checkArgument((host == null) || (this.port > 0 && this.port < 65536),
        "The supplied port must be a positive number less than 65536");

    this.username = username;
    this.password = password;

    checkArgument((username == null) == (password == null),
        "Both the proxy username and password must be supplied");
    checkArgument((host != null) || (username == null),
        "A host and port must be supplied with a username and password");

    this.domain = domain;
    this.workstation = workstation;

    checkArgument((domain == null) == (workstation == null),
        "Both the proxy domain and workstation must be supplied");
    checkArgument((username != null) || (domain == null),
        "NTLM requires a username, password, domain, and workstation to be supplied.");

    this.preemptiveBasicProxyAuth = preemptiveBasicProxyAuth;

    this.proxyBypassHosts = new ArrayList<String>(checkNotNull(proxyBypassHosts, "proxyBypassHosts is null"));