com.oziexplorer
Class MapFeature

java.lang.Object
  extended by com.oziexplorer.MapFeature

public class MapFeature
extends Object

This class represents map features. See OziAPI.addMapFeature(MapFeature).

Copyright 2011 Alan Burlison, . All rights reserved. Use is subject to license terms, see LICENSE.txt.
SourceForge.net


Field Summary
protected  String description
          The feature description.
protected  String name
          The feature name.
protected  int number
          The feature number, set by JNI code.
protected  String pictureName
          The feature picture pathname.
protected  Position position
          The feature position.
protected  String symbolName
          The feature symbol pathname.
protected  String waypointName
          The waypoint name, or null for no waypoint.
 
Constructor Summary
MapFeature(String name, Position position, String description)
          Create a new map feature.
MapFeature(String name, Position position, String description, String pictureName, String symbolName, String waypointName)
          Create a new map feature.
 
Method Summary
 boolean equals(Object that)
          Test if two map features are equal.
 String getDescription()
          Retrieve the feature description.
 String getName()
          Retrieve the name of the feature
 int getNumber()
          Retrieve the feature number.
 String getPictureName()
          Retrieve the picture pathname.
 Position getPosition()
          Retrieve the feature position.
 String getSymbolName()
          Retrieve the feature symbol pathname.
 String getWaypointName()
          Retrieve the waypoint name.
 int hashCode()
          Return the hash code for this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final String name
The feature name.


position

protected final Position position
The feature position.


description

protected final String description
The feature description.


pictureName

protected final String pictureName
The feature picture pathname.


symbolName

protected final String symbolName
The feature symbol pathname.


waypointName

protected final String waypointName
The waypoint name, or null for no waypoint.


number

protected final int number
The feature number, set by JNI code.

Constructor Detail

MapFeature

public MapFeature(String name,
                  Position position,
                  String description,
                  String pictureName,
                  String symbolName,
                  String waypointName)
Create a new map feature.

Parameters:
name - feature name.
position - feature position.
description - feature description.
pictureName - feature picture pathname.
symbolName - feature symbol - must be in symbols folder.
waypointName - waypoint name, or null for no waypoint.

MapFeature

public MapFeature(String name,
                  Position position,
                  String description)
Create a new map feature.

Parameters:
name - feature name.
position - feature position.
description - feature description.
Method Detail

equals

public boolean equals(Object that)
Test if two map features are equal. All the fields with the exception of the number OziExplorer assigns to the map feature are used in the comparison.

Overrides:
equals in class Object
Parameters:
that - the object to compare against.
Returns:
true if the objects are equal.

hashCode

public int hashCode()
Return the hash code for this object.

Overrides:
hashCode in class Object
Returns:
the hash code for this object.

getName

public String getName()
Retrieve the name of the feature

Returns:
the feature name.

getPosition

public Position getPosition()
Retrieve the feature position.

Returns:
the feature position.

getDescription

public String getDescription()
Retrieve the feature description.

Returns:
the feature description.

getPictureName

public String getPictureName()
Retrieve the picture pathname.

Returns:
the picture pathname.

getSymbolName

public String getSymbolName()
Retrieve the feature symbol pathname.

Returns:
the feature symbol pathname.

getWaypointName

public String getWaypointName()
Retrieve the waypoint name.

Returns:
the waypoint name. Null if there is no waypoint.

getNumber

public int getNumber()
Retrieve the feature number. This is set when the feature is displayed by a call to OziAPI.addMapFeature(MapFeature).

Returns:
the feature number.