public class TermImpl 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 MonolingualTextValueImpl.| Constructor and Description |
|---|
TermImpl(MonolingualTextValue other)
Copy constructor.
|
TermImpl(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() |
String |
toString() |
public TermImpl(String languageCode, String text)
languageCode - the language code of the valuetext - the text content of the valuepublic TermImpl(MonolingualTextValue other)
MonolingualTextValueImpl.other - monolingual text value to copypublic <T> T accept(ValueVisitor<T> valueVisitor)
Valuepublic String getText()
MonolingualTextValuegetText in interface MonolingualTextValuepublic String getLanguageCode()
MonolingualTextValuegetLanguageCode in interface MonolingualTextValueCopyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage