/*
 * Copyright 2011-2018 GatlingCorp (http://gatling.io)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.gatling.http.client;

public final class Param implements Comparable<Param> {

  private final String name;
  private final String value;

  public Param(String name, String value) {
    this.name = name;
    this.value = value;
  }

  public String getName() {
    return name;
  }

  public String getValue() {
    return value;
  }

  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    result = prime * result + ((value == null) ? 0 : value.hashCode());
    return result;
  }

  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (!(obj instanceof Param))
      return false;
    Param other = (Param) obj;
    if (name == null) {
      if (other.name != null)
        return false;
    } else if (!name.equals(other.name))
      return false;
    if (value == null) {
      if (other.value != null)
        return false;
    } else if (!value.equals(other.value))
      return false;
    return true;
  }

  @Override
  public int compareTo(Param other) {
    int keyDiff = name.compareTo(other.name);
    return keyDiff == 0 ? value.compareTo(other.value) : keyDiff;
  }
}

@@ -1864,11 +1864,156 @@
 iff;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return %22Param%7B%22 +%0A      %22name='%22 + name + '%5C'' +%0A      %22, value='%22 + value + '%5C'' +%0A      '%7D';%0A  %7D
 %0A%7D%0A

Add Param#toString