public class SnakGroupImpl extends AbstractList<Snak> implements SnakGroup
SnakGroup
deserialized from JSON. The
actual data is part of a map of lists of SnakImpl
objects in JSON,
so there is no corresponding JSON object.modCount
Constructor and Description |
---|
SnakGroupImpl(List<Snak> snaks)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Snak |
get(int i) |
PropertyIdValue |
getProperty()
Get the property used by each snak in this group.
|
List<Snak> |
getSnaks()
Get the list of Snaks of this group.
|
int |
hashCode() |
boolean |
isEmpty() |
Iterator<Snak> |
iterator() |
static List<SnakGroup> |
makeSnakGroups(Map<String,List<Snak>> snaks,
List<String> propertyOrder)
Construct a list of
SnakGroup objects from a map from property
ids to snak lists as found in JSON. |
int |
size() |
String |
toString() |
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, addAll, clear, contains, containsAll, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
addAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
public Snak get(int i)
public int size()
size
in interface Collection<Snak>
size
in interface List<Snak>
size
in class AbstractCollection<Snak>
public boolean isEmpty()
isEmpty
in interface Collection<Snak>
isEmpty
in interface List<Snak>
isEmpty
in class AbstractCollection<Snak>
public List<Snak> getSnaks()
SnakGroup
public PropertyIdValue getProperty()
SnakGroup
getProperty
in interface SnakGroup
public static List<SnakGroup> makeSnakGroups(Map<String,List<Snak>> snaks, List<String> propertyOrder)
SnakGroup
objects from a map from property
ids to snak lists as found in JSON.snaks
- the map with the datapublic int hashCode()
hashCode
in interface Collection<Snak>
hashCode
in interface List<Snak>
hashCode
in class AbstractList<Snak>
public boolean equals(Object obj)
equals
in interface Collection<Snak>
equals
in interface List<Snak>
equals
in class AbstractList<Snak>
public String toString()
toString
in class AbstractCollection<Snak>
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