Class Poi


  • public class Poi
    extends Object
    The Class Poi.
    Author:
    Mario Krumnow, Evamarie Wiessner
    • Constructor Detail

      • Poi

        public Poi()
    • Method Detail

      • add

        public static SumoCommand add​(String poiID,
                                      double x,
                                      double y,
                                      SumoColor color,
                                      String poiType,
                                      int layer,
                                      String imgFile,
                                      double width,
                                      double height,
                                      double angle)
        Add a new point-of-interest.
        Parameters:
        poiID - a string identifying the point-of-interest
        x - x-coordinate of the point
        y - y-coordinate of the point
        color - value (r,g,b,a) of color
        poiType - a string identifying the type of a poi
        layer - an integer identifying the layer
        imgFile - image file
        width - width of the poi
        height - height of the poi
        angle - angle of the poi
        Returns:
        SumoCommand
      • getIDCount

        public static SumoCommand getIDCount()
        Returns the number of all Poi's in the network.
        Returns:
        the number of POI's in the network
      • getColor

        public static SumoCommand getColor​(String poiID)
        Returns the color of this poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        Returns:
        color value
      • getIDList

        public static SumoCommand getIDList()
        Returns a list of IDs of all poi.
        Returns:
        a list of IDs of all points of interest
      • getParameter

        public static SumoCommand getParameter​(String poiID,
                                               String param)
        Returns the chosen parameter.
        Parameters:
        poiID - a string identifying the poi
        param - a string identifying the parameter
        Returns:
        the specific parameter
      • setParameter

        public static SumoCommand setParameter​(String poiID,
                                               String param,
                                               String value)
        Sets the chosen parameter.
        Parameters:
        poiID - the poi ID
        param - a string identifying the parameter
        value - a string identifying the new value
        Returns:
        SumoCommand
      • getPosition

        public static SumoCommand getPosition​(String poiID)
        Returns the position of this poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        Returns:
        position of the point
      • getType

        public static SumoCommand getType​(String poiID)
        Returns the type of the poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        Returns:
        type of the point
      • remove

        public static SumoCommand remove​(String poiID,
                                         int layer)
        Remove a poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        layer - an integer identifying the layer
        Returns:
        SumoCommand
      • setColor

        public static SumoCommand setColor​(String poiID,
                                           SumoColor color)
        Set the color of this poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        color - value (r,g,b,a) of color
        Returns:
        SumoCommand
      • setPosition

        public static SumoCommand setPosition​(String poiID,
                                              double x,
                                              double y)
        Set the position of this poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        x - x-coordinate of the point
        y - y-coordinate of the point
        Returns:
        SumoCommand
      • setType

        public static SumoCommand setType​(String poiID,
                                          String poiType)
        Set the type of the poi.
        Parameters:
        poiID - a string identifying the point-of-interest
        poiType - a string identifying the type of a poi
        Returns:
        SumoCommand