Class GravatarProfileInterest

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

public final class GravatarProfileInterest extends Object
Represents an interest or hobby on a Gravatar user's profile.
  • Constructor Details

    • GravatarProfileInterest

      public GravatarProfileInterest(int id, String name)
      Constructs a new GravatarProfileInterest.
      Parameters:
      id - the unique ID of the interest
      name - the name of the interest
      Throws:
      NullPointerException - if the provided name is null
      IllegalArgumentException - if the provided name is empty
  • Method Details

    • getId

      public int getId()
      Returns the unique ID of the interest.
      Returns:
      the unique ID of the interest
    • getName

      public String getName()
      Returns the name of the interest.
      Returns:
      the name of the interest
    • 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