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

com.github.messenger4j.webhook.event.common.PriorMessage Maven / Gradle / Ivy

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

import lombok.NonNull;

/**
 * @author Max Grabenhorst
 * @since 1.0.0
 */
public final class PriorMessage {
  private final String source;
  private final String identifier;

  public PriorMessage(@NonNull String source, @NonNull String identifier) {
    if (source == null) {
      throw new java.lang.IllegalArgumentException("source is marked @NonNull but is null");
    }
    if (identifier == null) {
      throw new java.lang.IllegalArgumentException("identifier is marked @NonNull but is null");
    }
    this.source = source;
    this.identifier = identifier;
  }

  public String source() {
    return source;
  }

  public String identifier() {
    return identifier;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  public java.lang.String toString() {
    return "PriorMessage(source=" + this.source + ", identifier=" + this.identifier + ")";
  }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy