public class PrimitiveTagTransferData extends java.lang.Object implements java.io.Serializable
TagTransferData
that holds tags that were copied from a collection of primitives.Modifier and Type | Field and Description |
---|---|
private java.util.EnumMap<OsmPrimitiveType,java.lang.Integer> |
counts |
static java.awt.datatransfer.DataFlavor |
FLAVOR
This is a data flavor added
|
private static long |
serialVersionUID |
private java.util.EnumMap<OsmPrimitiveType,TagCollection> |
tags |
Constructor and Description |
---|
PrimitiveTagTransferData(java.util.Collection<? extends PrimitiveData> source)
Create a new
PrimitiveTagTransferData |
PrimitiveTagTransferData(PrimitiveTransferData data)
Create a new
PrimitiveTagTransferData |
Modifier and Type | Method and Description |
---|---|
TagCollection |
getForPrimitives(OsmPrimitiveType type)
Gets the tags used for this primitive type.
|
int |
getSourcePrimitiveCount(OsmPrimitiveType type)
Gets the number of source primitives for the given type.
|
java.util.Map<OsmPrimitiveType,java.lang.Integer> |
getStatistics()
Gets the statistics of the source primitive counts.
|
boolean |
isHeterogeneousSource()
Determines if the source for tag pasting is heterogeneous, i.e.
|
private static final long serialVersionUID
public static final java.awt.datatransfer.DataFlavor FLAVOR
private final java.util.EnumMap<OsmPrimitiveType,TagCollection> tags
private final java.util.EnumMap<OsmPrimitiveType,java.lang.Integer> counts
public PrimitiveTagTransferData(java.util.Collection<? extends PrimitiveData> source)
PrimitiveTagTransferData
source
- The primitives to initialize this object with.public PrimitiveTagTransferData(PrimitiveTransferData data)
PrimitiveTagTransferData
data
- The primitives to initialize this object with.public boolean isHeterogeneousSource()
OsmPrimitive
s of exactly one typepublic TagCollection getForPrimitives(OsmPrimitiveType type)
type
- The primitive typepublic int getSourcePrimitiveCount(OsmPrimitiveType type)
type
- The typepublic java.util.Map<OsmPrimitiveType,java.lang.Integer> getStatistics()