org.mars_sim.msp.core.mars
Interface MineralMap

All Known Implementing Classes:
RandomMineralMap

public interface MineralMap

Interface for mineral maps of Mars.


Method Summary
 void destroy()
          Prepare object for garbage collection.
 Coordinates findRandomMineralLocation(Coordinates startingLocation, double range)
          Finds a random location with mineral concentrations from a starting location and within a distance range.
 Map<String,Double> getAllMineralConcentrations(Coordinates location)
          Gets all of the mineral concentrations at a given location.
 double getMineralConcentration(String mineralType, Coordinates location)
          Gets the mineral concentration at a given location.
 String[] getMineralTypeNames()
          Gets an array of all mineral type names.
 

Method Detail

getMineralConcentration

double getMineralConcentration(String mineralType,
                               Coordinates location)
Gets the mineral concentration at a given location.

Parameters:
mineralType - the mineral type (see MineralMap.java)
location - the coordinate location.
Returns:
percentage concentration (0 to 100.0)

getAllMineralConcentrations

Map<String,Double> getAllMineralConcentrations(Coordinates location)
Gets all of the mineral concentrations at a given location.

Parameters:
location - the coordinate location.
Returns:
map of mineral types and percentage concentration (0 to 100.0)

getMineralTypeNames

String[] getMineralTypeNames()
Gets an array of all mineral type names.

Returns:
array of name strings.

findRandomMineralLocation

Coordinates findRandomMineralLocation(Coordinates startingLocation,
                                      double range)
Finds a random location with mineral concentrations from a starting location and within a distance range.

Parameters:
startingLocation - the starting location.
range - the distance range (km).
Returns:
location with one or more mineral concentrations or null if none found.

destroy

void destroy()
Prepare object for garbage collection.



Copyright © 2009-2013. All Rights Reserved.