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

org.graylog2.contentpacks.model.entities.AutoValue_NativeEntity Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
package org.graylog2.contentpacks.model.entities;

import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NativeEntity extends NativeEntity {

  private final NativeEntityDescriptor descriptor;

  private final T entity;

  AutoValue_NativeEntity(
      NativeEntityDescriptor descriptor,
      T entity) {
    if (descriptor == null) {
      throw new NullPointerException("Null descriptor");
    }
    this.descriptor = descriptor;
    if (entity == null) {
      throw new NullPointerException("Null entity");
    }
    this.entity = entity;
  }

  @Override
  public NativeEntityDescriptor descriptor() {
    return descriptor;
  }

  @Override
  public T entity() {
    return entity;
  }

  @Override
  public String toString() {
    return "NativeEntity{"
        + "descriptor=" + descriptor + ", "
        + "entity=" + entity
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof NativeEntity) {
      NativeEntity that = (NativeEntity) o;
      return this.descriptor.equals(that.descriptor())
          && this.entity.equals(that.entity());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= descriptor.hashCode();
    h$ *= 1000003;
    h$ ^= entity.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy