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

com.google.javascript.jscomp.AutoValue_PolyfillUsageFinder_PolyfillUsage Maven / Gradle / Ivy


package com.google.javascript.jscomp;

import com.google.javascript.rhino.Node;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_PolyfillUsageFinder_PolyfillUsage extends PolyfillUsageFinder.PolyfillUsage {

  private final PolyfillUsageFinder.Polyfill polyfill;
  private final Node node;
  private final String name;
  private final boolean isExplicitGlobal;

  AutoValue_PolyfillUsageFinder_PolyfillUsage(
      PolyfillUsageFinder.Polyfill polyfill,
      Node node,
      String name,
      boolean isExplicitGlobal) {
    if (polyfill == null) {
      throw new NullPointerException("Null polyfill");
    }
    this.polyfill = polyfill;
    if (node == null) {
      throw new NullPointerException("Null node");
    }
    this.node = node;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    this.isExplicitGlobal = isExplicitGlobal;
  }

  @Override
  PolyfillUsageFinder.Polyfill polyfill() {
    return polyfill;
  }

  @Override
  Node node() {
    return node;
  }

  @Override
  String name() {
    return name;
  }

  @Override
  boolean isExplicitGlobal() {
    return isExplicitGlobal;
  }

  @Override
  public String toString() {
    return "PolyfillUsage{"
        + "polyfill=" + polyfill + ", "
        + "node=" + node + ", "
        + "name=" + name + ", "
        + "isExplicitGlobal=" + isExplicitGlobal
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PolyfillUsageFinder.PolyfillUsage) {
      PolyfillUsageFinder.PolyfillUsage that = (PolyfillUsageFinder.PolyfillUsage) o;
      return (this.polyfill.equals(that.polyfill()))
           && (this.node.equals(that.node()))
           && (this.name.equals(that.name()))
           && (this.isExplicitGlobal == that.isExplicitGlobal());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.polyfill.hashCode();
    h *= 1000003;
    h ^= this.node.hashCode();
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.isExplicitGlobal ? 1231 : 1237;
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy