public abstract class AbstractFeature extends java.lang.Object implements Feature
Modifier | Constructor and Description |
---|---|
protected |
AbstractFeature()
Creates a new feature with no attributes.
|
protected |
AbstractFeature(java.util.List<EarthLocation> points)
Creates a new feature with no attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
add(EarthLocation point)
Adds a new point to this feature.
|
void |
addAll(Feature feature)
Adds a number of points from another feature to this feature.
|
boolean |
equals(java.lang.Object obj) |
EarthLocation |
get(int index)
Gets a point from this feature.
|
java.lang.Object |
getAttribute(int index)
Gets the value of the specified attribute.
|
int |
getAttributeCount()
Gets the number of attributes.
|
int |
hashCode() |
java.util.Iterator<EarthLocation> |
iterator()
Gets an iterator over the points associated with this feature.
|
EarthLocation |
remove(int index)
Removes a point from this feature.
|
protected void |
setAttributes(java.lang.Object[] attributeArray)
Sets the attribute array.
|
int |
size()
Gets the total number of points in this feature.
|
protected AbstractFeature(java.util.List<EarthLocation> points)
points
- the list of points to use for this feature, or null to
not create a list of points. In this case, the child class is responsible
for the feature points.protected AbstractFeature()
public java.lang.Object getAttribute(int index)
Feature
getAttribute
in interface Feature
index
- the index of the attribute to get.protected void setAttributes(java.lang.Object[] attributeArray)
attributeArray
- the array of feature attributes.public java.util.Iterator<EarthLocation> iterator()
Feature
iterator
in interface java.lang.Iterable<EarthLocation>
iterator
in interface Feature
public void add(EarthLocation point)
public EarthLocation get(int index)
public int size()
public EarthLocation remove(int index)
public void addAll(Feature feature)
public int getAttributeCount()
Feature
getAttributeCount
in interface Feature
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object