Skip to content

Commit

Permalink
Add equals to RawRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 committed Sep 27, 2023
1 parent bcb970e commit d4ec6c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 9 additions & 0 deletions libs/model/src/main/java/de/cyface/model/RawRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,13 @@ public void setSpeed(double speed) {
public void setModality(Modality modality) {
this.modality = modality;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RawRecord rawRecord = (RawRecord) o;
return Double.compare(rawRecord.accuracy, accuracy) == 0 && Double.compare(rawRecord.speed, speed) == 0 && modality == rawRecord.modality;
}
}
4 changes: 0 additions & 4 deletions libs/model/src/main/kotlin/de/cyface/model/CalibrationJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class CalibrationJob : Job {
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var isProcessable: Boolean
private set

/**
* The number of locations to be processed for this job.
Expand All @@ -47,21 +46,18 @@ class CalibrationJob : Job {
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var rotatedLocations = 0
private set

/**
* The number of locations which where filtered due to invalid speed, accuracy or time gaps.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var invalidLocations = 0
private set

/**
* The number of locations which were filtered during interpolation.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var nonInterpolatableLocations = 0
private set

/**
* Constructs a fully initialized instance of this class.
Expand Down

0 comments on commit d4ec6c6

Please sign in to comment.