Class StatementUpdateImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.StatementUpdateImpl
- All Implemented Interfaces:
StatementUpdate
Jackson implementation of
StatementUpdate.- See Also:
-
Field Summary
Fields inherited from interface org.wikidata.wdtk.datamodel.interfaces.StatementUpdate
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionStatementUpdateImpl(Collection<Statement> added, Collection<Statement> replaced, Collection<String> removed) Initializes new statement update. -
Method Summary
-
Constructor Details
-
StatementUpdateImpl
public StatementUpdateImpl(Collection<Statement> added, Collection<Statement> replaced, Collection<String> removed) Initializes new statement update.- Parameters:
added- added statementsreplaced- replaced statementsremoved- IDs of removed statements- Throws:
NullPointerException- if any parameter or any item isnullIllegalArgumentException- if any parameters or their combination is invalid
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:StatementUpdateChecks whether the update is empty. Empty update will not change or remove any statements.- Specified by:
isEmptyin interfaceStatementUpdate- Returns:
trueif the update is empty,falseotherwise
-
getAdded
Description copied from interface:StatementUpdateReturns statements added to the entity in this update.- Specified by:
getAddedin interfaceStatementUpdate- Returns:
- list of added statements
-
getReplaced
Description copied from interface:StatementUpdateReturns entity statements modified in this update.- Specified by:
getReplacedin interfaceStatementUpdate- Returns:
- modified statements indexed by statement ID
-
getRemoved
Description copied from interface:StatementUpdateReturns IDs of statements removed from the entity in this update.- Specified by:
getRemovedin interfaceStatementUpdate- Returns:
- list of IDs of removed statements
-
equals
-
hashCode
public int hashCode()
-