public enum OsmPrimitiveType extends Enum<OsmPrimitiveType>
Enum Constant and Description |
---|
CLOSEDWAY |
MULTIPOLYGON |
NODE |
RELATION |
WAY |
Modifier and Type | Field and Description |
---|---|
private String |
apiTypeName |
private static Collection<OsmPrimitiveType> |
DATA_VALUES |
private Class<? extends PrimitiveData> |
dataClass |
private Class<? extends OsmPrimitive> |
osmClass |
Modifier and Type | Method and Description |
---|---|
static Collection<OsmPrimitiveType> |
dataValues() |
static OsmPrimitiveType |
from(IPrimitive obj)
Determines the OSM primitive type of the given object.
|
static OsmPrimitiveType |
from(String value) |
static OsmPrimitiveType |
fromApiTypeName(String typeName) |
String |
getAPIName() |
Class<? extends PrimitiveData> |
getDataClass() |
Class<? extends OsmPrimitive> |
getOsmClass() |
OsmPrimitive |
newInstance(long uniqueId,
boolean allowNegative) |
String |
toString() |
static OsmPrimitiveType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OsmPrimitiveType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OsmPrimitiveType NODE
public static final OsmPrimitiveType WAY
public static final OsmPrimitiveType RELATION
public static final OsmPrimitiveType CLOSEDWAY
public static final OsmPrimitiveType MULTIPOLYGON
private static final Collection<OsmPrimitiveType> DATA_VALUES
private final String apiTypeName
private final Class<? extends OsmPrimitive> osmClass
private final Class<? extends PrimitiveData> dataClass
public static OsmPrimitiveType[] values()
for (OsmPrimitiveType c : OsmPrimitiveType.values()) System.out.println(c);
public static OsmPrimitiveType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getAPIName()
public Class<? extends OsmPrimitive> getOsmClass()
public Class<? extends PrimitiveData> getDataClass()
public static OsmPrimitiveType fromApiTypeName(String typeName)
public static OsmPrimitiveType from(IPrimitive obj)
obj
- the OSM object to inspectobj
IllegalArgumentException
- if obj
is null or of unknown typepublic static OsmPrimitiveType from(String value)
public static Collection<OsmPrimitiveType> dataValues()
public OsmPrimitive newInstance(long uniqueId, boolean allowNegative)
public String toString()
toString
in class Enum<OsmPrimitiveType>