com.google.javascript.rhino.jstype.AutoValue_FunctionType_Parameter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler Show documentation
Show all versions of closure-compiler Show documentation
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.
package com.google.javascript.rhino.jstype;
import javax.annotation.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 ^= this.JSType.hashCode();
h *= 1000003;
h ^= this.optional ? 1231 : 1237;
h *= 1000003;
h ^= this.variadic ? 1231 : 1237;
return h;
}
private static final long serialVersionUID = 1L;
}