Class TermUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.TermUpdateImpl
- All Implemented Interfaces:
TermUpdate
Jackson implementation of
TermUpdate.-
Field Summary
Fields inherited from interface org.wikidata.wdtk.datamodel.interfaces.TermUpdate
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionTermUpdateImpl(Collection<MonolingualTextValue> modified, Collection<String> removed) Initializes new term update. -
Method Summary
-
Constructor Details
-
TermUpdateImpl
Initializes new term update.- Parameters:
modified- added or changed termsremoved- language codes of removed terms- Throws:
NullPointerException- if any required parameter or its item isnullIllegalArgumentException- if any parameters or their combination is invalid
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:TermUpdateChecks whether the update is empty. Empty update will not change or remove any terms.- Specified by:
isEmptyin interfaceTermUpdate- Returns:
trueif the update is empty,falseotherwise
-
getModified
Description copied from interface:TermUpdateReturns terms added or modified in this update. Existing terms are preserved if their language code is not listed here.- Specified by:
getModifiedin interfaceTermUpdate- Returns:
- added or modified terms indexed by language code
-
getRemoved
Description copied from interface:TermUpdateReturns language codes of terms removed in this update.- Specified by:
getRemovedin interfaceTermUpdate- Returns:
- language codes of removed terms
-
equals
-
hashCode
public int hashCode()
-