|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectus.zuercher.gpx2map.data.AbstractGpxEntity
public abstract class AbstractGpxEntity
AbstractGpxEntity is an abstract base class for entities in a GPX file. Entities are items such as way-points, track-points or route-points each of which contain properties of various types.
Subclasses of AbstractGpxEntity provide sets
of property
names that are associated with property types.
Field Summary | |
---|---|
protected static SimpleDateFormat |
dateFormatter
Used to format date/time properties output via toString() . |
private Map<String,Object> |
properties
Map of property names to propery values, across types. |
Constructor Summary | |
---|---|
AbstractGpxEntity()
Construct a new AbstractGpxEntity. |
Method Summary | |
---|---|
boolean |
equals(AbstractGpxEntity other)
Compare this AbstractGpxEntity to another for equality, based on properties. |
boolean |
equals(Object other)
Compare this AbstractGpxEntity to another for equality, based on properties. |
Date |
getDateTimeProperty(String propertyName)
Retrieves the value of the given date/time property. |
abstract Set<String> |
getDateTimePropertyNames()
Returns a set of property names that refer to date/time properties. |
Double |
getDecimalProperty(String propertyName)
Retrieves the value of the given decimal property. |
abstract Set<String> |
getDecimalPropertyNames()
Returns a set of property names that refer to decimal properties. |
Integer |
getIntegerProperty(String propertyName)
Retrieves the value of the given integer property. |
abstract Set<String> |
getIntegerPropertyNames()
Returns a set of property names that refer to integer properties. |
String |
getStringProperty(String propertyName)
Retrieves the value of the given string property. |
abstract Set<String> |
getStringPropertyNames()
Returns a set of property names that refer to string properties. |
int |
hashCode()
Compute a reasonable hash code for this AbstractGpxEntity. |
void |
setDateTimeProperty(String propertyName,
Date value)
Sets the given date/time property to the given value. |
void |
setDecimalProperty(String propertyName,
double value)
Sets the given decimal property to the given value. |
void |
setIntegerProperty(String propertyName,
int value)
Sets the given integer property to the given value. |
void |
setStringProperty(String propertyName,
String value)
Sets the given string property to the given value. |
String |
toString()
Return a string representation of this AbstractGpxEntity's properties. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final SimpleDateFormat dateFormatter
toString()
.
private final Map<String,Object> properties
Constructor Detail |
---|
AbstractGpxEntity()
Method Detail |
---|
public abstract Set<String> getStringPropertyNames()
public abstract Set<String> getDecimalPropertyNames()
public abstract Set<String> getIntegerPropertyNames()
public abstract Set<String> getDateTimePropertyNames()
public String getStringProperty(String propertyName)
propertyName
- the name of a string property
public void setStringProperty(String propertyName, String value)
propertyName
- property's namevalue
- value to set
IllegalArgumentException
- if propertyName does not refer to a
string propertypublic Double getDecimalProperty(String propertyName)
propertyName
- the name of a decimal property
public void setDecimalProperty(String propertyName, double value)
propertyName
- property's namevalue
- value to set
IllegalArgumentException
- if propertyName does not refer to a
decimal propertypublic Integer getIntegerProperty(String propertyName)
propertyName
- the name of an integer property
public void setIntegerProperty(String propertyName, int value)
propertyName
- property's namevalue
- value to set
IllegalArgumentException
- if propertyName does not refer to an
integer propertypublic Date getDateTimeProperty(String propertyName)
propertyName
- the name of a date/time property
public void setDateTimeProperty(String propertyName, Date value)
propertyName
- property's namevalue
- value to set
IllegalArgumentException
- if propertyName does not refer to a
date/time propertypublic boolean equals(AbstractGpxEntity other)
other
- the other AbstractGpxEntity
public boolean equals(Object other)
equals
in class Object
other
- the other AbstractGpxEntity
ClassCastException
- if other
is not an
AbstractGpxEntity
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |