public class DefaultGomLangInfo extends AbstractGomElement implements GomLangInfo, GomCheckable
Modifier and Type | Class and Description |
---|---|
class |
DefaultGomLangInfo.GomLangHashCode
Hash code storage object.
|
GomCheckable.Context
Constructor and Description |
---|
DefaultGomLangInfo()
Constructor for parsing.
|
DefaultGomLangInfo(de.espirit.firstspirit.common.text.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)
Clones this language information container and completes missing information by the given source.
|
protected DefaultGomLangInfo.GomLangHashCode |
createHashCode()
Create this object's hash code.
|
protected boolean |
equals(DefaultGomLangInfo other,
boolean ignoreLanguage)
Equality check implementation on a concrete language information implementation.
|
boolean |
equals(Object obj)
Equality check implementation that ignores the language.
|
boolean |
equals(Object obj,
boolean ignoreLanguage)
Equality check implementation.
|
protected String |
getDefaultTag()
Provides the default tag.
|
String |
getDescription()
Provides the stored description.
|
protected de.espirit.common.util.HashCode |
getHashCode()
Provide this information object's hashcode.
|
String |
getLabel()
Provides the stored label.
|
de.espirit.firstspirit.common.text.LanguageAbbreviation |
getLang()
Provides the language of this information.
|
int |
hashCode()
Hash code implementation.
|
boolean |
isEmpty()
Indicates, whether no language information have been defined.
|
void |
setDescription(String description)
Sets the description.
|
void |
setLabel(String label)
Sets the label.
|
void |
setLang(de.espirit.firstspirit.common.text.LanguageAbbreviation lang)
Sets the language for this information.
|
void |
validate(GomCheckable.Context context)
Validate the element against the given context.
|
void |
verify()
Verify the element to be fulfill its syntactic constraints.
|
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(de.espirit.firstspirit.common.text.LanguageAbbreviation lang)
protected String getDefaultTag()
getDefaultTag
in class AbstractGomElement
public de.espirit.firstspirit.common.text.LanguageAbbreviation getLang()
getLang
in interface GomLangInfo
public String getDescription()
getDescription
in interface GomLangInfo
public String getLabel()
getLabel
in interface GomLangInfo
public void setLang(de.espirit.firstspirit.common.text.LanguageAbbreviation lang)
setLang
in interface GomLangInfo
lang
- The language abbreviation object.public void setDescription(String description)
setDescription
in interface GomLangInfo
description
- The description.public void setLabel(String label)
setLabel
in interface GomLangInfo
label
- The label.public GomLangInfo cloneAndComplete(GomLangInfo source)
cloneAndComplete
in interface GomLangInfo
source
- A source language information container.public boolean equals(Object obj)
public boolean equals(Object obj, boolean ignoreLanguage)
equals
in interface GomLangInfo
obj
- The object to compare to.ignoreLanguage
- true
, to ignore the language.true
, if considered equal.protected boolean equals(DefaultGomLangInfo other, boolean ignoreLanguage)
other
- The object to compare to.ignoreLanguage
- true
, to ignore the language.protected final de.espirit.common.util.HashCode getHashCode()
protected DefaultGomLangInfo.GomLangHashCode createHashCode()
public int hashCode()
public boolean isEmpty()
isEmpty
in interface GomLangInfo
true
, if no language information have been defined.public void verify() throws IllegalStateException
verify
in interface GomCheckable
IllegalStateException
- If the element is not correctly set up.public void validate(GomCheckable.Context context) throws GomValidationError
validate
in interface GomCheckable
context
- The context to validate for.GomValidationError
- If the element is not plausible wrt. its context.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210