public class Feature
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Feature.FeatureType |
Modifier and Type | Field and Description |
---|---|
java.util.HashMap<java.lang.String,java.lang.Object> |
properties
Stores data properties.
|
Constructor and Description |
---|
Feature(Feature.FeatureType type)
Creates a feature for a specific type.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
addProperty(java.lang.String key,
java.lang.Object value)
Adds a property to this feature.
|
java.lang.String |
getId()
Returns the ID of this feature.
|
java.lang.Integer |
getIntegerProperty(java.lang.String key)
Returns the value of a Integer property.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getProperties()
Returns all data properties.
|
java.lang.Object |
getProperty(java.lang.String key)
Returns a property for the key.
|
java.lang.String |
getStringProperty(java.lang.String key)
Returns the value of a String property.
|
Feature.FeatureType |
getType()
Returns the type of this feature.
|
void |
putProperty(java.lang.String key,
java.lang.Object value)
Adds a property to this feature.
|
void |
setId(java.lang.String id)
Sets the ID of this feature.
|
void |
setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
Sets all properties.
|
public java.util.HashMap<java.lang.String,java.lang.Object> properties
public Feature(Feature.FeatureType type)
type
- The type of this feature.public Feature.FeatureType getType()
public java.util.HashMap<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String key)
key
- The key of the property.public java.lang.Object addProperty(java.lang.String key, java.lang.Object value)
key
- The key of this property.value
- The value of this property.public void putProperty(java.lang.String key, java.lang.Object value)
key
- The key of this property.value
- The value of this property.public java.lang.String getStringProperty(java.lang.String key)
getProperty(String)
and convert it yourself.key
- The key of the property.public java.lang.Integer getIntegerProperty(java.lang.String key)
key
- The key of the property.public void setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
properties
- The data properties.public java.lang.String getId()
public void setId(java.lang.String id)
id
- The ID.