de.fhpotsdam.unfolding.data
Class ShapeFeature

java.lang.Object
  extended by de.fhpotsdam.unfolding.data.Feature
      extended by de.fhpotsdam.unfolding.data.ShapeFeature

public class ShapeFeature
extends Feature

Stores a list of locations. Is used for lines and polygons.


Nested Class Summary
 
Nested classes/interfaces inherited from class de.fhpotsdam.unfolding.data.Feature
Feature.FeatureType
 
Field Summary
 java.util.List<Location> locations
          The list of locations.
 
Fields inherited from class de.fhpotsdam.unfolding.data.Feature
properties
 
Constructor Summary
ShapeFeature(Feature.FeatureType type)
          Creates a shape feature with the type.
 
Method Summary
 void addLocation(Location location)
          Adds a location to this shape feature.
 java.util.List<Location> getLocations()
          Returns all locations of this shape feature.
 
Methods inherited from class de.fhpotsdam.unfolding.data.Feature
addProperty, getId, getProperties, getProperty, getStringProperty, getType, putProperty, setId, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locations

public java.util.List<Location> locations
The list of locations.

Constructor Detail

ShapeFeature

public ShapeFeature(Feature.FeatureType type)
Creates a shape feature with the type.

Parameters:
type - The type. Should be either Feature.FeatureType.LINES or Feature.FeatureType.POLYGON.
Method Detail

getLocations

public java.util.List<Location> getLocations()
Returns all locations of this shape feature.

Returns:
The locations.

addLocation

public void addLocation(Location location)
Adds a location to this shape feature. Will be added at the end of the list.

Parameters:
location - A location.