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
ConstructorDescriptionStatementUpdateImpl
(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 isnull
IllegalArgumentException
- if any parameters or their combination is invalid
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:StatementUpdate
Checks whether the update is empty. Empty update will not change or remove any statements.- Specified by:
isEmpty
in interfaceStatementUpdate
- Returns:
true
if the update is empty,false
otherwise
-
getAdded
Description copied from interface:StatementUpdate
Returns statements added to the entity in this update.- Specified by:
getAdded
in interfaceStatementUpdate
- Returns:
- list of added statements
-
getReplaced
Description copied from interface:StatementUpdate
Returns entity statements modified in this update.- Specified by:
getReplaced
in interfaceStatementUpdate
- Returns:
- modified statements indexed by statement ID
-
getRemoved
Description copied from interface:StatementUpdate
Returns IDs of statements removed from the entity in this update.- Specified by:
getRemoved
in interfaceStatementUpdate
- Returns:
- list of IDs of removed statements
-
equals
-
hashCode
public int hashCode()
-