@Entity
public class AggregatedMovement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
SPEED_TOLERANCE
Maximum acceptable rounding error that should be accounted for when comparing speeds
|
Constructor and Description |
---|
AggregatedMovement() |
AggregatedMovement(MonitoredArea area,
java.time.Instant time,
java.lang.Integer positionX,
java.lang.Integer positionY,
java.lang.Double speed) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
MonitoredArea |
getArea() |
java.util.UUID |
getId()
Returns the ID of the movement
|
Point2D |
getPosition()
Returns the camera coordinates
|
java.lang.Integer |
getPositionX()
Returns the camera screen x coordinate
|
java.lang.Integer |
getPositionY()
Returns the camera screen y coordinate
|
java.lang.Double |
getSpeed()
Returns the speed scalar
|
java.time.Instant |
getTime()
Returns the time when the detected object passed through the point
|
java.lang.Integer |
getWeight()
Returns the number of points that have been aggregated into this object
|
int |
hashCode() |
static int |
roundPositionX(int x)
Rounds an x coordinate to the nearest value representable in aggregated data
|
static int |
roundPositionY(int y)
Rounds an y coordinate to the nearest value representable in aggregated data
|
static double |
roundSpeed(double speed)
Rounds speed to the nearest value representable in aggregated data
|
static java.time.Instant |
roundTime(java.time.Instant time)
Rounds date *down* to the nearest value representable in aggregated data
|
void |
setArea(MonitoredArea area) |
void |
setId(java.util.UUID id)
Sets the ID of the movement
|
void |
setPositionX(java.lang.Integer positionX)
Sets the camera screen x coordinate
|
void |
setPositionY(java.lang.Integer positionY)
Sets the camera screen y coordinate
|
void |
setSpeed(java.lang.Double speed)
Sets the value of the speed scalar
|
void |
setTime(java.time.Instant time)
Sets the time when the detected object passed through the point
|
void |
setWeight(java.lang.Integer weight)
Sets the number of points that have been aggregated into this object
|
public static final double SPEED_TOLERANCE
public AggregatedMovement()
public AggregatedMovement(MonitoredArea area, java.time.Instant time, java.lang.Integer positionX, java.lang.Integer positionY, java.lang.Double speed)
public static int roundPositionX(int x)
x
- the original x coordinatepublic static int roundPositionY(int y)
y
- the original y coordinatepublic static java.time.Instant roundTime(java.time.Instant time)
time
- the original datepublic static double roundSpeed(double speed)
speed
- the original speedpublic java.util.UUID getId()
public void setId(java.util.UUID id)
id
- the new ID of the movementpublic java.time.Instant getTime()
public void setTime(java.time.Instant time)
time
- the time when the detected object passed through the pointpublic java.lang.Integer getPositionX()
public void setPositionX(java.lang.Integer positionX)
positionX
- the camera screen x coordinatepublic java.lang.Integer getPositionY()
public void setPositionY(java.lang.Integer positionY)
positionY
- the camera screen x coordinatepublic Point2D getPosition()
public java.lang.Double getSpeed()
public void setSpeed(java.lang.Double speed)
speed
- the value of the speed scalarpublic java.lang.Integer getWeight()
public void setWeight(java.lang.Integer weight)
weight
- the number of points that have been aggregated into this objectpublic MonitoredArea getArea()
public void setArea(MonitoredArea area)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object