MonolingualTextValue, Valuepublic class JacksonMonolingualTextValue extends java.lang.Object implements MonolingualTextValue
MonolingualTextValue data used in labels,
aliases, and descriptions in JSON. Note that this is distinct from the JSON
representation for property values of type MonolingualTextValue,
which is implemented in JacksonValueMonolingualText.| Constructor | Description |
|---|---|
JacksonMonolingualTextValue() |
Constructor.
|
JacksonMonolingualTextValue(java.lang.String languageCode,
java.lang.String text) |
Create a new object from the given data.
|
JacksonMonolingualTextValue(MonolingualTextValue mltv) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
<T> T |
accept(ValueVisitor<T> valueVisitor) |
Accept a ValueVisitor and return its output.
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getLanguageCode() |
Get the language code of this value.
|
java.lang.String |
getText() |
Get the text of this value.
|
int |
hashCode() |
|
void |
setLanguageCode(java.lang.String languageCode) |
Sets the language code to the given value.
|
void |
setText(java.lang.String text) |
Sets the text to the given value.
|
java.lang.String |
toString() |
public JacksonMonolingualTextValue()
public JacksonMonolingualTextValue(java.lang.String languageCode,
java.lang.String text)
languageCode - the language code of the valuetext - the text content of the valuepublic JacksonMonolingualTextValue(MonolingualTextValue mltv)
mltv - the object to copy the data frompublic void setLanguageCode(java.lang.String languageCode)
languageCode - new valuepublic void setText(java.lang.String text)
text - new valuepublic <T> T accept(ValueVisitor<T> valueVisitor)
Valuepublic java.lang.String getText()
MonolingualTextValuegetText in interface MonolingualTextValuepublic java.lang.String getLanguageCode()
MonolingualTextValuegetLanguageCode in interface MonolingualTextValuepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2014–2017 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage