Class GravatarProfileLanguage
java.lang.Object
com.github.natche.gravatarjavaclient.profile.serialization.GravatarProfileLanguage
Represents a language on a Gravatar user's profile.
-
Constructor Summary
ConstructorsConstructorDescriptionGravatarProfileLanguage(String code, String name, boolean isPrimary, int order) Constructs a new GravatarProfileLanguage. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the provided object is equal to this.getCode()Returns the language code.getName()Returns the name of the language.intgetOrder()Returns the order of the language in the profile.inthashCode()Returns a hashcode for this object.booleanReturns whether this is the primary language.toString()Returns a string representation of this object.
-
Constructor Details
-
GravatarProfileLanguage
Constructs a new GravatarProfileLanguage.- Parameters:
code- the language codename- the name of the languageisPrimary- whether this is the primary languageorder- the order of the language in the profile- Throws:
NullPointerException- if any string is nullIllegalArgumentException- if name or code is empty
-
-
Method Details
-
getCode
Returns the language code.- Returns:
- the language code
-
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
Returns whether the provided object is equal to this. -
hashCode
public int hashCode()Returns a hashcode for this object. -
toString
Returns a string representation of this object.
-