Class Hotspot

java.lang.Object
com.example.cab302project.Hotspot

public class Hotspot extends Object
Represents a geographic crime hotspot, defined by a central coordinate and the number of crimes clustered within that area. Used by the dashboard and police dashboard to render hotspot markers on the map with intensity based on the crime count.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Hotspot(double latitude, double longitude, int count)
    Constructs a new Hotspot with the given coordinates and crime count.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the number of crimes clustered at this hotspot.
    double
    Returns the latitude of the hotspot centre.
    double
    Returns the longitude of the hotspot centre.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Hotspot

      public Hotspot(double latitude, double longitude, int count)
      Constructs a new Hotspot with the given coordinates and crime count.
      Parameters:
      latitude - the latitude of the hotspot centre
      longitude - the longitude of the hotspot centre
      count - the number of crimes clustered at this hotspot
  • Method Details

    • getLatitude

      public double getLatitude()
      Returns the latitude of the hotspot centre.
      Returns:
      latitude as a double
    • getLongitude

      public double getLongitude()
      Returns the longitude of the hotspot centre.
      Returns:
      longitude as a double
    • getCount

      public int getCount()
      Returns the number of crimes clustered at this hotspot.
      Returns:
      crime count as an integer