Package com.massifmaps.geometry
Class FeatureCollection
java.lang.Object
com.massifmaps.geometry.FeatureCollection
- Direct Known Subclasses:
VectorTileFeatureCollection
A collection of features.
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureCollection(FeatureVector features) Constructs a FeatureCollection from a vector of features. -
Method Summary
Modifier and TypeMethodDescriptiongetFeature(int index) Returns the feature at the specified index.intReturns the number of features in this container.
-
Constructor Details
-
FeatureCollection
Constructs a FeatureCollection from a vector of features.- Parameters:
features- The features for the collection.
-
-
Method Details
-
getFeatureCount
public int getFeatureCount()Returns the number of features in this container.- Returns:
- The number of features.
-
getFeature
Returns the feature at the specified index. Index must be between 0 and getFeatureCount (exclusive).- Parameters:
index- The index of the feature to get.- Returns:
- The feature at specified index.
- Throws:
IndexOutOfBoundsException- If the index is out of range.
-