public class DefaultGomLangInfo extends AbstractGomElement implements GomLangInfo
Modifier and Type | Class and Description |
---|---|
class |
DefaultGomLangInfo.GomLangHashCode |
Constructor and Description |
---|
DefaultGomLangInfo() |
DefaultGomLangInfo(LanguageAbbreviation lang)
Convenience constructor.
|
DefaultGomLangInfo(String lang,
String label,
String description)
Convenience constructor for direct usage.
|
Modifier and Type | Method and Description |
---|---|
GomLangInfo |
cloneAndComplete(GomLangInfo source)
Produce a mutable clone of the instance being completed by
values from the given source.
|
protected DefaultGomLangInfo.GomLangHashCode |
createHashCode() |
protected boolean |
equals(DefaultGomLangInfo other,
boolean ignoreLanguage) |
boolean |
equals(Object obj) |
boolean |
equals(Object obj,
boolean ignoreLanguage)
Checks, if the given object is equal to this one.
|
protected String |
getDefaultTag()
Return the default tag for a gom element.
|
String |
getDescription()
Get the description.
|
protected HashCode |
getHashCode() |
String |
getLabel()
Get the label.
|
LanguageAbbreviation |
getLang()
Get the language the information is defined for.
|
int |
hashCode() |
boolean |
isEmpty()
Indicates an empty language info object.
|
void |
setDescription(String description)
Set the description.
|
void |
setLabel(String label)
Set the label.
|
void |
setLang(LanguageAbbreviation lang)
Set the language the information is given for.
|
void |
validate()
Validate the class for being correctly set up.
|
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
public static final String TAG
public DefaultGomLangInfo()
public DefaultGomLangInfo(LanguageAbbreviation lang)
protected String getDefaultTag()
AbstractGomElement
getDefaultTag
in class AbstractGomElement
public LanguageAbbreviation getLang()
GomLangInfo
getLang
in interface GomLangInfo
public String getDescription()
GomLangInfo
getDescription
in interface GomLangInfo
public String getLabel()
GomLangInfo
getLabel
in interface GomLangInfo
public void setLang(LanguageAbbreviation lang)
GomLangInfo
setLang
in interface GomLangInfo
lang
- The information's source language.public void setDescription(String description)
GomLangInfo
setDescription
in interface GomLangInfo
description
- The description.public void setLabel(String label)
GomLangInfo
setLabel
in interface GomLangInfo
label
- The label's value.public void validate() throws IllegalStateException
GomElement
validate
in interface GomElement
IllegalStateException
- If the instance is in an illegal state.public GomLangInfo cloneAndComplete(GomLangInfo source)
GomLangInfo
cloneAndComplete
in interface GomLangInfo
public boolean equals(Object obj, boolean ignoreLanguage)
GomLangInfo
equals
in interface GomLangInfo
obj
- The object to compare to.ignoreLanguage
- Ignore difference in language.true
, if the object is similar.protected boolean equals(DefaultGomLangInfo other, boolean ignoreLanguage)
protected final HashCode getHashCode()
protected DefaultGomLangInfo.GomLangHashCode createHashCode()
public boolean isEmpty()
GomLangInfo
isEmpty
in interface GomLangInfo
true
, if the info is seen as empty.Copyright © 2015 e-Spirit AG. All Rights Reserved. Build 5.1.408