|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNPTLab.DTNHWMap
public class DTNHWMap
Class that contains a map to mantain the one to one realtionship between a DTNHost and his DTNHostWrapper implemented with a singleton pattern.
Method Summary | |
---|---|
void |
add(DTNHost h,
core.Coord destination,
int day,
double time)
Adds to the map an entrance of Host and a DTNHostWrapper from the DTNHWMAP or a new one if it didn't exist. |
static DTNHWMap |
getInstance()
Returns the instance of the map. |
DTNHostWrapper |
returnDTNHostWrapper(DTNHost h)
Returns the DTNHostWrapper for the given DTNHost h |
java.util.Map<DTNHost,DTNHostWrapper> |
returnMap()
Returns the Map |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DTNHWMap getInstance()
public void add(DTNHost h, core.Coord destination, int day, double time)
h
- DTNHost the moving hostdestination
- Coord the coordinates of the location where the host is goingday
- int the day in which the user visited a specified locationtime
- double the time spent at a single locationpublic java.util.Map<DTNHost,DTNHostWrapper> returnMap()
public DTNHostWrapper returnDTNHostWrapper(DTNHost h)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |