Class GravatarProfileLanguage

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

public final class GravatarProfileLanguage extends Object
Represents a language on a Gravatar user's profile.
  • Constructor Details

    • GravatarProfileLanguage

      public GravatarProfileLanguage(String code, String name, boolean isPrimary, int order)
      Constructs a new GravatarProfileLanguage.
      Parameters:
      code - the language code
      name - the name of the language
      isPrimary - whether this is the primary language
      order - the order of the language in the profile
      Throws:
      NullPointerException - if any string is null
      IllegalArgumentException - if name or code is empty
  • Method Details

    • getCode

      public String getCode()
      Returns the language code.
      Returns:
      the language code
    • getName

      public String getName()
      Returns the name of the language.
      Returns:
      the name of the language
    • isPrimary

      public boolean isPrimary()
      Returns whether this is the primary language.
      Returns:
      whether this is the primary language
    • getOrder

      public int getOrder()
      Returns the order of the language in the profile.
      Returns:
      the order of the language in the profile
    • 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