NPTLab
Class CoordSetUser

java.lang.Object
  extended by NPTLab.CoordSet
      extended by NPTLab.CoordSetUser

public class CoordSetUser
extends CoordSet

Class that contains in a set, personal for every user, every Coord a user visited paired with his map of locations and time per each location


Field Summary
 
Fields inherited from class NPTLab.CoordSet
GlobalSet
 
Constructor Summary
CoordSetUser()
          Public constuctor that assigns the Set
 
Method Summary
 void add(core.Coord c, java.lang.Integer Day, java.lang.Double Time)
          Adds a Coord, a day and a time for the day to the set if cointainted setDayndTime else it creates a CoordWrapperUserMap object and letting that class handle the rest
 boolean containsCoord(core.Coord c)
          Checks if the set contaiins a given Coord Element
 core.Coord getCoord(CoordWrapperUserMap cwum)
          Returns the (x,y) Coord object contained in a CoordWrapperUserMap
 CoordWrapperUserMap getCwumByCw(CoordWrapper cw)
          Returns the CoordWrapperUserMap object that contains the givent CoordWrap element
 java.util.Set<CoordWrapperUserMap> getSet()
          Returns the Set of CoordWrapperUserMap
 int numberOfLocations()
          Returns the number of locationa user visited ( size of his set of locations )
 java.lang.String toString()
          Method for printing
 
Methods inherited from class NPTLab.CoordSet
addCw, contains, getCw, getEntryIdByCoord
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoordSetUser

public CoordSetUser()
Public constuctor that assigns the Set

Method Detail

containsCoord

public boolean containsCoord(core.Coord c)
Checks if the set contaiins a given Coord Element

Parameters:
c - Coord to check
Returns:
boolean true if contained, else false

add

public void add(core.Coord c,
                java.lang.Integer Day,
                java.lang.Double Time)
Adds a Coord, a day and a time for the day to the set if cointainted setDayndTime else it creates a CoordWrapperUserMap object and letting that class handle the rest

Parameters:
c - Coord
Day - day in wich the user visits the location
Time - time the user stay in a location

getCwumByCw

public CoordWrapperUserMap getCwumByCw(CoordWrapper cw)
Returns the CoordWrapperUserMap object that contains the givent CoordWrap element

Parameters:
cw - CoordWrapper the object i whose map we are intrested
Returns:
CoordWrapperUserMap

numberOfLocations

public int numberOfLocations()
Returns the number of locationa user visited ( size of his set of locations )

Returns:
int

getCoord

public core.Coord getCoord(CoordWrapperUserMap cwum)
Returns the (x,y) Coord object contained in a CoordWrapperUserMap

Parameters:
cwum - CoordWrapperUserMap
Returns:
Coord

getSet

public java.util.Set<CoordWrapperUserMap> getSet()
Returns the Set of CoordWrapperUserMap

Returns:
Set

toString

public java.lang.String toString()
Method for printing

Overrides:
toString in class CoordSet
Returns:
string