Class GravatarProfileRequestResult

java.lang.Object
com.github.natche.gravatarjavaclient.profile.serialization.GravatarProfileRequestResult

@Immutable public final class GravatarProfileRequestResult extends Object
Represents metadata of a Gravatar profile request.
  • Constructor Details

    • GravatarProfileRequestResult

      public GravatarProfileRequestResult(Instant requestInstant, boolean succeeded)
      Constructs a new GravatarProfileRequestResult.
      Parameters:
      requestInstant - the instant when the request was made
      succeeded - whether the request succeeded
      Throws:
      NullPointerException - if requestInstant is null
  • Method Details

    • getRequestInstant

      public Instant getRequestInstant()
      Returns the instant the request was made at.
      Returns:
      the instant of the request
    • succeeded

      public boolean succeeded()
      Returns whether the request succeeded.
      Returns:
      whether the request succeeded
    • failed

      public boolean failed()
      Returns whether the request failed.
      Returns:
      true if the request failed, false otherwise
    • equals

      public boolean equals(Object o)
      Returns whether the provided object is equal to this.
      Overrides:
      equals in class Object
      Parameters:
      o - the other object
      Returns:
      whether the provided object is equal to this
    • hashCode

      public int hashCode()
      Returns a hashcode for this object.
      Overrides:
      hashCode in class Object
      Returns:
      a hashcode for this object
    • toString

      public String toString()
      Returns a string representation of this object.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this object