Class DataStore<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>>
java.lang.Object
org.openstreetmap.josm.data.vector.DataStore<O,N,W,R>
- Type Parameters:
O- Type of OSM primitiveN- Type of nodeW- Type of wayR- Type of relation
- Direct Known Subclasses:
VectorDataStore
class DataStore<O extends IPrimitive,N extends INode,W extends IWay<N>,R extends IRelation<?>>
extends Object
A class that stores data (essentially a simple
DataSet)- Since:
- 17862
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classThis literally only exists to makeQuadBucketPrimitiveStore.removePrimitive(org.openstreetmap.josm.data.osm.IPrimitive)public -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Set<org.openstreetmap.gui.jmapviewer.Tile>protected final Collection<DataSource>protected final Map<PrimitiveId,O> private final ReentrantReadWriteLockprotected final DataStore.LocalQuadBucketPrimitiveStore<N,W, R> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataSource(DataSource dataSource) Add a datasource to this data setprotected voidaddPrimitive(O primitive) Add a primitive to this datasetGet the primitives map.protected ReentrantReadWriteLockGet the read/write lock for this datasetgetStore()protected voidremovePrimitive(O primitive) Add a primitive to this dataset
-
Field Details
-
store
-
allPrimitives
-
addedTiles
-
primitivesMap
-
dataSources
-
readWriteLock
-
-
Constructor Details
-
DataStore
-
-
Method Details
-
getStore
-
getAllPrimitives
-
getPrimitivesMap
Get the primitives map. The returned map is aCollections.synchronizedMap(java.util.Map<K, V>). Please synchronize on it.- Returns:
- The Primitives map.
-
getDataSources
-
addDataSource
Add a datasource to this data set- Parameters:
dataSource- The datasource to add
-
removePrimitive
Add a primitive to this dataset- Parameters:
primitive- The primitive to remove
-
addPrimitive
Add a primitive to this dataset- Parameters:
primitive- The primitive to add
-
getReadWriteLock
Get the read/write lock for this dataset- Returns:
- The read/write lock
-