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
ConstructorDescriptionTermUpdateImpl
(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 isnull
IllegalArgumentException
- if any parameters or their combination is invalid
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:TermUpdate
Checks whether the update is empty. Empty update will not change or remove any terms.- Specified by:
isEmpty
in interfaceTermUpdate
- Returns:
true
if the update is empty,false
otherwise
-
getModified
Description copied from interface:TermUpdate
Returns terms added or modified in this update. Existing terms are preserved if their language code is not listed here.- Specified by:
getModified
in interfaceTermUpdate
- Returns:
- added or modified terms indexed by language code
-
getRemoved
Description copied from interface:TermUpdate
Returns language codes of terms removed in this update.- Specified by:
getRemoved
in interfaceTermUpdate
- Returns:
- language codes of removed terms
-
equals
-
hashCode
public int hashCode()
-