All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.javascript.rhino.jstype.AutoValue_FunctionType_Parameter Maven / Gradle / Ivy

Go to download

Closure Compiler is a JavaScript optimizing compiler. It parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. It is used in many of Google's JavaScript apps, including Gmail, Google Web Search, Google Maps, and Google Docs.

There is a newer version: v20240317
Show newest version


package com.google.javascript.rhino.jstype;

import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_FunctionType_Parameter extends FunctionType.Parameter {

  private final JSType JSType;
  private final boolean optional;
  private final boolean variadic;

  AutoValue_FunctionType_Parameter(
      JSType JSType,
      boolean optional,
      boolean variadic) {
    if (JSType == null) {
      throw new NullPointerException("Null JSType");
    }
    this.JSType = JSType;
    this.optional = optional;
    this.variadic = variadic;
  }

  @Override
  public JSType getJSType() {
    return JSType;
  }

  @Override
  public boolean isOptional() {
    return optional;
  }

  @Override
  public boolean isVariadic() {
    return variadic;
  }

  @Override
  public String toString() {
    return "Parameter{"
         + "JSType=" + JSType + ", "
         + "optional=" + optional + ", "
         + "variadic=" + variadic
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof FunctionType.Parameter) {
      FunctionType.Parameter that = (FunctionType.Parameter) o;
      return (this.JSType.equals(that.getJSType()))
           && (this.optional == that.isOptional())
           && (this.variadic == that.isVariadic());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= JSType.hashCode();
    h$ *= 1000003;
    h$ ^= optional ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= variadic ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy