Enum TaggingPresetType
- java.lang.Object
-
- java.lang.Enum<TaggingPresetType>
-
- org.openstreetmap.josm.gui.tagging.presets.TaggingPresetType
-
- All Implemented Interfaces:
Serializable
,Comparable<TaggingPresetType>
public enum TaggingPresetType extends Enum<TaggingPresetType>
Enumeration of OSM primitive types associated with names and icons- Since:
- 6068
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSEDWAY
Closed wayMULTIPOLYGON
MultipolygonNODE
NodeRELATION
RelationWAY
Way
-
Constructor Summary
Constructors Modifier Constructor Description private
TaggingPresetType(String iconName, String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TaggingPresetType
forPrimitive(IPrimitive p)
Determines theTaggingPresetType
of a given primitive.static TaggingPresetType
forPrimitiveType(OsmPrimitiveType type)
Determines theTaggingPresetType
of a given primitive type.static TaggingPresetType
fromString(String type)
Determines theTaggingPresetType
from a given string.String
getIconName()
Replies the SVG icon name.String
getName()
Replies the name, as used in XML presets.static TaggingPresetType
valueOf(String name)
Returns the enum constant of this type with the specified name.static TaggingPresetType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NODE
public static final TaggingPresetType NODE
Node
-
WAY
public static final TaggingPresetType WAY
Way
-
RELATION
public static final TaggingPresetType RELATION
Relation
-
CLOSEDWAY
public static final TaggingPresetType CLOSEDWAY
Closed way
-
MULTIPOLYGON
public static final TaggingPresetType MULTIPOLYGON
Multipolygon
-
-
Constructor Detail
-
TaggingPresetType
private TaggingPresetType(String iconName, String name)
-
-
Method Detail
-
values
public static TaggingPresetType[] 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 (TaggingPresetType c : TaggingPresetType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TaggingPresetType valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getIconName
public String getIconName()
Replies the SVG icon name.- Returns:
- the SVG icon name
-
getName
public String getName()
Replies the name, as used in XML presets.- Returns:
- the name: "node", "way", "relation" or "closedway"
-
forPrimitive
public static TaggingPresetType forPrimitive(IPrimitive p)
Determines theTaggingPresetType
of a given primitive.- Parameters:
p
- The OSM primitive- Returns:
- the
TaggingPresetType
ofp
-
forPrimitiveType
public static TaggingPresetType forPrimitiveType(OsmPrimitiveType type)
Determines theTaggingPresetType
of a given primitive type.- Parameters:
type
- The OSM primitive type- Returns:
- the
TaggingPresetType
oftype
-
fromString
public static TaggingPresetType fromString(String type)
Determines theTaggingPresetType
from a given string.- Parameters:
type
- The OSM primitive type as string ("node", "way", "relation" or "closedway")- Returns:
- the
TaggingPresetType
fromtype
-
-