com.mapquest
Class Feature

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.Feature
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LineFeature, PointFeature, PolygonFeature

public abstract class Feature
extends MQObject

An abstract parent class for objects which refer to map features.

See Also:
DistanceUnits

Field Summary
 
Fields inherited from class com.mapquest.MQObject
CLASS_ID, CLASS_NAME, DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
Feature()
          Default Constructor.
Feature(Feature copy)
          Copy Constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 double getDistance()
          Returns the distance from the center of a radius search
 double getDistance(DistanceUnits du)
          Returns the distance from the center of a radius search
 int getDT()
          Returns the display type of this Feature.
 long getGEFID()
          Returns the GEFID of this Feature.
 java.lang.String getKey()
          Returns this object's Key.
 java.lang.String getName()
          Returns the name of this Feature.
 java.lang.String getSourceLayerName()
          Returns the name of the Source Layer from which this Feature was extracted.
 int hashCode()
          Returns a hash code for this Feature.
 void init()
          Initializes object.
 void setDistance(double dDistance)
          Sets the distance from the center of a radius search
 void setDistance(double dDistance, DistanceUnits du)
          Sets the distance from the center of a radius search
 void setDT(int n)
          Sets this Feature's display type.
 void setGEFID(long lKey)
          Sets the unique numeric identifier for this Feature.
 void setKey(java.lang.String strK)
          Sets the key value of this object.
 void setName(java.lang.String sName)
          Sets the name of this Feature.
 void setSourceLayerName(java.lang.String sSourceLayerName)
          Sets the source layer name.
 
Methods inherited from class com.mapquest.MQObject
clone, getClassId, getClassName, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Feature

public Feature()
Default Constructor.


Feature

public Feature(Feature copy)
Copy Constructor.

Method Detail

init

public void init()
Initializes object.

Overrides:
init in class MQObject

setKey

public void setKey(java.lang.String strK)
Sets the key value of this object. The key is a unique identifier for this Feature which is used for a database table key.

Parameters:
strK - The value that the key is to be set to.

getKey

public java.lang.String getKey()
Returns this object's Key.


setName

public void setName(java.lang.String sName)
Sets the name of this Feature.

Parameters:
sName - The name that this Feature is to be assigned.

getName

public java.lang.String getName()
Returns the name of this Feature.

Returns:
The name of this Feature.

setDT

public void setDT(int n)
Sets this Feature's display type.

Parameters:
n - The display type that this Feature is to be set to.

getDT

public int getDT()
Returns the display type of this Feature.

Returns:
The display type of this Feature.

setGEFID

public void setGEFID(long lKey)
Sets the unique numeric identifier for this Feature.

Parameters:
lKey - A unique numeric identifier that this Feature's GEFID is to be set to.

getGEFID

public long getGEFID()
Returns the GEFID of this Feature.

Returns:
The GEFID of this Feature.

setSourceLayerName

public void setSourceLayerName(java.lang.String sSourceLayerName)
Sets the source layer name. This is the name of the source layer from which this Feature was extracted (used only when the feature is returned from a search).


getSourceLayerName

public java.lang.String getSourceLayerName()
Returns the name of the Source Layer from which this Feature was extracted.

Returns:
The source layer from which this Feature was extracted.

getDistance

public double getDistance()
Returns the distance from the center of a radius search

Returns:
the distance from the center of a radius search in Miles.

getDistance

public double getDistance(DistanceUnits du)
Returns the distance from the center of a radius search

Parameters:
du - DistanceUnits Miles or KiloMeters
Returns:
the distance from the center of a radius search.

setDistance

public void setDistance(double dDistance)
Sets the distance from the center of a radius search

Parameters:
dDistance - The distance from the center of a radius search

setDistance

public void setDistance(double dDistance,
                        DistanceUnits du)
Sets the distance from the center of a radius search

Parameters:
dDistance - The distance from the center of a radius search
du - DistanceUnits Miles or KiloMeters

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a Feature object that has same attributes as this object.

Overrides:
equals in class MQObject
Parameters:
otherObject - the object to compare this Feature against.
Returns:
true if the Feature objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this Feature.

Overrides:
hashCode in class MQObject
Returns:
a hash code value for this Feature.