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

com.google.javascript.jscomp.colors.$AutoValue_Color 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.jscomp.colors;

import com.google.common.collect.ImmutableSet;
import javax.annotation.processing.Generated;
import org.jspecify.nullness.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 abstract class $AutoValue_Color extends Color {

  private final ColorId id;
  private final ImmutableSet prototypes;
  private final ImmutableSet instanceColors;
  private final boolean invalidating;
  private final boolean propertiesKeepOriginalName;
  private final boolean constructor;
  private final ImmutableSet ownProperties;
  private final @Nullable ColorId boxId;
  private final boolean closureAssert;
  private final ImmutableSet unionElements;

  $AutoValue_Color(
      ColorId id,
      ImmutableSet prototypes,
      ImmutableSet instanceColors,
      boolean invalidating,
      boolean propertiesKeepOriginalName,
      boolean constructor,
      ImmutableSet ownProperties,
       @Nullable ColorId boxId,
      boolean closureAssert,
      ImmutableSet unionElements) {
    if (id == null) {
      throw new NullPointerException("Null id");
    }
    this.id = id;
    if (prototypes == null) {
      throw new NullPointerException("Null prototypes");
    }
    this.prototypes = prototypes;
    if (instanceColors == null) {
      throw new NullPointerException("Null instanceColors");
    }
    this.instanceColors = instanceColors;
    this.invalidating = invalidating;
    this.propertiesKeepOriginalName = propertiesKeepOriginalName;
    this.constructor = constructor;
    if (ownProperties == null) {
      throw new NullPointerException("Null ownProperties");
    }
    this.ownProperties = ownProperties;
    this.boxId = boxId;
    this.closureAssert = closureAssert;
    if (unionElements == null) {
      throw new NullPointerException("Null unionElements");
    }
    this.unionElements = unionElements;
  }

  @Override
  public ColorId getId() {
    return id;
  }

  @Override
  public ImmutableSet getPrototypes() {
    return prototypes;
  }

  @Override
  public ImmutableSet getInstanceColors() {
    return instanceColors;
  }

  @Override
  public boolean isInvalidating() {
    return invalidating;
  }

  @Override
  public boolean getPropertiesKeepOriginalName() {
    return propertiesKeepOriginalName;
  }

  @Override
  public boolean isConstructor() {
    return constructor;
  }

  @Override
  public ImmutableSet getOwnProperties() {
    return ownProperties;
  }

  @Override
  public @Nullable ColorId getBoxId() {
    return boxId;
  }

  @Override
  public boolean isClosureAssert() {
    return closureAssert;
  }

  @Override
  public ImmutableSet getUnionElements() {
    return unionElements;
  }

  @Override
  public String toString() {
    return "Color{"
         + "id=" + id + ", "
         + "prototypes=" + prototypes + ", "
         + "instanceColors=" + instanceColors + ", "
         + "invalidating=" + invalidating + ", "
         + "propertiesKeepOriginalName=" + propertiesKeepOriginalName + ", "
         + "constructor=" + constructor + ", "
         + "ownProperties=" + ownProperties + ", "
         + "boxId=" + boxId + ", "
         + "closureAssert=" + closureAssert + ", "
         + "unionElements=" + unionElements
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Color) {
      Color that = (Color) o;
      return (this.id.equals(that.getId()))
           && (this.prototypes.equals(that.getPrototypes()))
           && (this.instanceColors.equals(that.getInstanceColors()))
           && (this.invalidating == that.isInvalidating())
           && (this.propertiesKeepOriginalName == that.getPropertiesKeepOriginalName())
           && (this.constructor == that.isConstructor())
           && (this.ownProperties.equals(that.getOwnProperties()))
           && ((this.boxId == null) ? (that.getBoxId() == null) : this.boxId.equals(that.getBoxId()))
           && (this.closureAssert == that.isClosureAssert())
           && (this.unionElements.equals(that.getUnionElements()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= id.hashCode();
    h$ *= 1000003;
    h$ ^= prototypes.hashCode();
    h$ *= 1000003;
    h$ ^= instanceColors.hashCode();
    h$ *= 1000003;
    h$ ^= invalidating ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= propertiesKeepOriginalName ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= constructor ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= ownProperties.hashCode();
    h$ *= 1000003;
    h$ ^= (boxId == null) ? 0 : boxId.hashCode();
    h$ *= 1000003;
    h$ ^= closureAssert ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= unionElements.hashCode();
    return h$;
  }

  static final class Builder extends Color.Builder {
    private ColorId id;
    private ImmutableSet prototypes;
    private ImmutableSet instanceColors;
    private Boolean invalidating;
    private Boolean propertiesKeepOriginalName;
    private Boolean constructor;
    private ImmutableSet ownProperties;
    private @Nullable ColorId boxId;
    private Boolean closureAssert;
    private ImmutableSet unionElements;
    Builder() {
    }
    @Override
    public Color.Builder setId(ColorId id) {
      if (id == null) {
        throw new NullPointerException("Null id");
      }
      this.id = id;
      return this;
    }
    @Override
    public Color.Builder setPrototypes(ImmutableSet prototypes) {
      if (prototypes == null) {
        throw new NullPointerException("Null prototypes");
      }
      this.prototypes = prototypes;
      return this;
    }
    @Override
    public Color.Builder setInstanceColors(ImmutableSet instanceColors) {
      if (instanceColors == null) {
        throw new NullPointerException("Null instanceColors");
      }
      this.instanceColors = instanceColors;
      return this;
    }
    @Override
    public Color.Builder setInvalidating(boolean invalidating) {
      this.invalidating = invalidating;
      return this;
    }
    @Override
    public Color.Builder setPropertiesKeepOriginalName(boolean propertiesKeepOriginalName) {
      this.propertiesKeepOriginalName = propertiesKeepOriginalName;
      return this;
    }
    @Override
    public Color.Builder setConstructor(boolean constructor) {
      this.constructor = constructor;
      return this;
    }
    @Override
    public Color.Builder setOwnProperties(ImmutableSet ownProperties) {
      if (ownProperties == null) {
        throw new NullPointerException("Null ownProperties");
      }
      this.ownProperties = ownProperties;
      return this;
    }
    @Override
    Color.Builder setBoxId(@Nullable ColorId boxId) {
      this.boxId = boxId;
      return this;
    }
    @Override
    public Color.Builder setClosureAssert(boolean closureAssert) {
      this.closureAssert = closureAssert;
      return this;
    }
    @Override
    Color.Builder setUnionElements(ImmutableSet unionElements) {
      if (unionElements == null) {
        throw new NullPointerException("Null unionElements");
      }
      this.unionElements = unionElements;
      return this;
    }
    @Override
    Color buildInternal() {
      String missing = "";
      if (this.id == null) {
        missing += " id";
      }
      if (this.prototypes == null) {
        missing += " prototypes";
      }
      if (this.instanceColors == null) {
        missing += " instanceColors";
      }
      if (this.invalidating == null) {
        missing += " invalidating";
      }
      if (this.propertiesKeepOriginalName == null) {
        missing += " propertiesKeepOriginalName";
      }
      if (this.constructor == null) {
        missing += " constructor";
      }
      if (this.ownProperties == null) {
        missing += " ownProperties";
      }
      if (this.closureAssert == null) {
        missing += " closureAssert";
      }
      if (this.unionElements == null) {
        missing += " unionElements";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_Color(
          this.id,
          this.prototypes,
          this.instanceColors,
          this.invalidating,
          this.propertiesKeepOriginalName,
          this.constructor,
          this.ownProperties,
          this.boxId,
          this.closureAssert,
          this.unionElements);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy