org.openstreetmap.josm.data.osm
Enum OsmPrimitiveType

java.lang.Object
  extended by java.lang.Enum<OsmPrimitiveType>
      extended by org.openstreetmap.josm.data.osm.OsmPrimitiveType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<OsmPrimitiveType>

public enum OsmPrimitiveType
extends java.lang.Enum<OsmPrimitiveType>


Enum Constant Summary
CLOSEDWAY
           
MULTIPOLYGON
           
NODE
           
RELATION
           
WAY
           
 
Field Summary
private  java.lang.String apiTypeName
           
private static java.util.Collection<OsmPrimitiveType> DATA_VALUES
           
private  java.lang.Class<? extends PrimitiveData> dataClass
           
private  java.lang.Class<? extends OsmPrimitive> osmClass
           
 
Method Summary
static java.util.Collection<OsmPrimitiveType> dataValues()
           
static OsmPrimitiveType from(IPrimitive obj)
           
static OsmPrimitiveType from(java.lang.String value)
           
static OsmPrimitiveType fromApiTypeName(java.lang.String typeName)
           
 java.lang.String getAPIName()
           
 java.lang.Class<? extends PrimitiveData> getDataClass()
           
 java.lang.Class<? extends OsmPrimitive> getOsmClass()
           
 OsmPrimitive newInstance(long uniqueId, boolean allowNegative)
           
 java.lang.String toString()
           
static OsmPrimitiveType valueOf(java.lang.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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NODE

public static final OsmPrimitiveType NODE

WAY

public static final OsmPrimitiveType WAY

RELATION

public static final OsmPrimitiveType RELATION

CLOSEDWAY

public static final OsmPrimitiveType CLOSEDWAY

MULTIPOLYGON

public static final OsmPrimitiveType MULTIPOLYGON
Field Detail

DATA_VALUES

private static final java.util.Collection<OsmPrimitiveType> DATA_VALUES

apiTypeName

private final java.lang.String apiTypeName

osmClass

private final java.lang.Class<? extends OsmPrimitive> osmClass

dataClass

private final java.lang.Class<? extends PrimitiveData> dataClass
Method Detail

values

public static OsmPrimitiveType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OsmPrimitiveType c : OsmPrimitiveType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OsmPrimitiveType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getAPIName

public java.lang.String getAPIName()

getOsmClass

public java.lang.Class<? extends OsmPrimitive> getOsmClass()

getDataClass

public java.lang.Class<? extends PrimitiveData> getDataClass()

fromApiTypeName

public static OsmPrimitiveType fromApiTypeName(java.lang.String typeName)

from

public static OsmPrimitiveType from(IPrimitive obj)

from

public static OsmPrimitiveType from(java.lang.String value)

dataValues

public static java.util.Collection<OsmPrimitiveType> dataValues()

newInstance

public OsmPrimitive newInstance(long uniqueId,
                                boolean allowNegative)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<OsmPrimitiveType>


JOSM