public class JacksonMonolingualTextValue extends 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 and Description |
|---|
JacksonMonolingualTextValue()
Constructor.
|
JacksonMonolingualTextValue(MonolingualTextValue mltv)
Copy constructor.
|
JacksonMonolingualTextValue(String languageCode,
String text)
Create a new object from the given data.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(ValueVisitor<T> valueVisitor)
Accept a ValueVisitor and return its output.
|
boolean |
equals(Object obj) |
String |
getLanguageCode()
Get the language code of this value.
|
String |
getText()
Get the text of this value.
|
int |
hashCode() |
void |
setLanguageCode(String languageCode)
Sets the language code to the given value.
|
void |
setText(String text)
Sets the text to the given value.
|
String |
toString() |
public JacksonMonolingualTextValue()
public JacksonMonolingualTextValue(String languageCode, 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(String languageCode)
languageCode - new valuepublic void setText(String text)
text - new valuepublic <T> T accept(ValueVisitor<T> valueVisitor)
Valuepublic String getText()
MonolingualTextValuegetText in interface MonolingualTextValuepublic String getLanguageCode()
MonolingualTextValuegetLanguageCode in interface MonolingualTextValueCopyright © 2014 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage