com.mapquest
Class MQObject

java.lang.Object
  extended bycom.mapquest.MQObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AutoGeocodeCovSwitch, AutoMapCovSwitch, AutoRouteCovSwitch, BaseDTStyle, CatToDTMap, DBLayerQuery, DisplayState, Feature, FeatureSpecifier, GeocodeOptions, IdentifyCriteria, LatLng, Location, Maneuver, MapCommand, MapState, MQObjectCollection, ObjectCollection, Point, Primitive, RecordSet, RouteMatrixResults, RouteOptions, RouteResults, SearchCriteria, Sign, TrekRoute

public abstract class MQObject
extends java.lang.Object
implements java.lang.Cloneable

Is the root of the class hierarchy. Almost every class in the MapQuest Java client has MQObject as a superclass.


Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
static int DEFAULT_ID
           
static java.lang.String DEFAULT_NAME
           
static long DEFAULT_VERSION
           
static int FORMAT_NUMERIC_ID
           
static int FORMAT_TEXT_NAME
           
static int INVALID_ID
           
static java.lang.String INVALID_NAME
           
static long INVALID_VERSION
           
 
Constructor Summary
MQObject()
          Default constructor.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
static int getFormat()
          Returns the format used to indentify a class during serialization.
 java.lang.String getIdWithVersion()
          Returns the class id of this object with the version concatenated to the end.
 java.lang.String getNameWithVersion()
          Returns the class name of this object with the version concatenated to the end.
 long getObjectVersion()
          Internal use only.
 int getTypeId()
          Deprecated. Use getClassId instead.
 java.lang.String getTypeName()
          Deprecated. Use getClassName instead.
static boolean getVerboseConsoleOutput()
          Returns the status of printing text messages to the console.
 int hashCode()
          Returns a hash code for this MQObject.
 void init()
          Initializes object.
static void setFormat(int format)
          Sets the format used to indentify a class during serialization.
 void setObjectVersion(long lVersion)
          Internal use only.
static void setVerboseConsoleOutput(boolean b)
          Sets the status of printing text messages to the console.
 java.lang.String toString()
          Converts the contents of this class to a comma-separated string.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_NUMERIC_ID

public static final int FORMAT_NUMERIC_ID
See Also:
Constant Field Values

FORMAT_TEXT_NAME

public static final int FORMAT_TEXT_NAME
See Also:
Constant Field Values

INVALID_ID

public static final int INVALID_ID
See Also:
Constant Field Values

INVALID_NAME

public static final java.lang.String INVALID_NAME
See Also:
Constant Field Values

INVALID_VERSION

public static final long INVALID_VERSION
See Also:
Constant Field Values

DEFAULT_ID

public static final int DEFAULT_ID
See Also:
Constant Field Values

DEFAULT_NAME

public static final java.lang.String DEFAULT_NAME
See Also:
Constant Field Values

DEFAULT_VERSION

public static final long DEFAULT_VERSION
See Also:
Constant Field Values

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

MQObject

public MQObject()
Default constructor.

Method Detail

init

public void init()
Initializes object.


getTypeId

public int getTypeId()
Deprecated. Use getClassId instead.

Returns the numeric id of this class.

Returns:
the numeric id of this class.

getTypeName

public java.lang.String getTypeName()
Deprecated. Use getClassName instead.

Returns the text name of this class.

Returns:
the text name of this class.

getClassId

public int getClassId()
Returns the numeric id of this class.

Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Returns:
the text name of this class.

getObjectVersion

public long getObjectVersion()
Internal use only.


setObjectVersion

public void setObjectVersion(long lVersion)
Internal use only.


setVerboseConsoleOutput

public static final void setVerboseConsoleOutput(boolean b)
Sets the status of printing text messages to the console. These text messages echo the HTTP communications between the client library and the server. The messages are mainly used for debugging. Messages which indicate an error are still printed to the console.

Parameters:
b - Set to true to enable printing message, false to disable messages.

getVerboseConsoleOutput

public static final boolean getVerboseConsoleOutput()
Returns the status of printing text messages to the console.


toString

public java.lang.String toString()
Converts the contents of this class to a comma-separated string.

Returns:
The contents of this class in a comma-separated format. The class name forms a header for the string.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.


getFormat

public static int getFormat()
Returns the format used to indentify a class during serialization. Values include: ClassType.NUMERIC_ID_FORMAT ClassType.TEXT_NAME_FORMAT

Returns:
the format used to indentify a class during serialization.

setFormat

public static void setFormat(int format)
Sets the format used to indentify a class during serialization. Values include: ClassType.NUMERIC_ID_FORMAT ClassType.TEXT_NAME_FORMAT

Parameters:
format - the format used to indentify a class during serialization.

getNameWithVersion

public java.lang.String getNameWithVersion()
Returns the class name of this object with the version concatenated to the end. For example: "EllipsePrimitive.1".


getIdWithVersion

public java.lang.String getIdWithVersion()
Returns the class id of this object with the version concatenated to the end. For example: "1571.1".


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 MQObject object that has same attributes as this object.

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

hashCode

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

Returns:
a hash code value for this MQObject.