Modifier | Constructor and Description |
---|---|
|
ReferenceImpl(List<SnakGroup> groups)
Constructor.
|
protected |
ReferenceImpl(Map<String,List<SnakImpl>> snaks,
List<String> propertyOrder,
String hash)
Constructor for deserialization from JSON.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Iterator<Snak> |
getAllSnaks()
Returns an interator over all snaks, without considering snak groups.
|
String |
getHash()
Wikibase calculates a hash for each reference based on the content of the reference.
|
List<String> |
getPropertyOrder()
Returns the list of property ids used to order snaks as found in JSON.
|
List<SnakGroup> |
getSnakGroups()
Get the list of snak groups associated with this reference.
|
Map<String,List<Snak>> |
getSnaks()
Returns the map of snaks as found in JSON.
|
int |
hashCode() |
String |
toString() |
public ReferenceImpl(List<SnakGroup> groups)
The order of the snaks groups provided will be respected. the properties used by the snak groups should be distinct.
groups
- the snaks group which form the referencepublic List<SnakGroup> getSnakGroups()
Reference
getSnakGroups
in interface Reference
public Map<String,List<Snak>> getSnaks()
public String getHash()
Reference
public List<String> getPropertyOrder()
public Iterator<Snak> getAllSnaks()
Reference
getAllSnaks
in interface Reference
Copyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage