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

com.github.messenger4j.messengerprofile.targetaudience.WhitelistTargetAudience Maven / Gradle / Ivy

// Generated by delombok at Tue May 07 22:31:27 CEST 2019
package com.github.messenger4j.messengerprofile.targetaudience;

import com.github.messenger4j.common.SupportedCountry;
import java.util.List;
import lombok.NonNull;

/**
 * @author Max Grabenhorst
 * @since 1.0.0
 */
public final class WhitelistTargetAudience extends TargetAudience {
  private final List countries;

  private WhitelistTargetAudience(List countries) {
    super(Type.CUSTOM);
    this.countries = countries;
  }

  public static WhitelistTargetAudience create(@NonNull List countries) {
    if (countries == null) {
      throw new java.lang.IllegalArgumentException("countries is marked @NonNull but is null");
    }
    return new WhitelistTargetAudience(countries);
  }

  public List countries() {
    return countries;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public java.lang.String toString() {
    return "WhitelistTargetAudience(super="
        + super.toString()
        + ", countries="
        + this.countries
        + ")";
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public boolean equals(final java.lang.Object o) {
    if (o == this) return true;
    if (!(o instanceof WhitelistTargetAudience)) return false;
    final WhitelistTargetAudience other = (WhitelistTargetAudience) o;
    if (!other.canEqual((java.lang.Object) this)) return false;
    if (!super.equals(o)) return false;
    final java.lang.Object this$countries = this.countries;
    final java.lang.Object other$countries = other.countries;
    if (this$countries == null ? other$countries != null : !this$countries.equals(other$countries))
      return false;
    return true;
  }

  @java.lang.SuppressWarnings("all")
  protected boolean canEqual(final java.lang.Object other) {
    return other instanceof WhitelistTargetAudience;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public int hashCode() {
    final int PRIME = 59;
    int result = super.hashCode();
    final java.lang.Object $countries = this.countries;
    result = result * PRIME + ($countries == null ? 43 : $countries.hashCode());
    return result;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy