aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/model/Typed.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/model/Typed.java b/src/main/java/org/traccar/model/Typed.java
index 313ec7bcd..fc671ac70 100644
--- a/src/main/java/org/traccar/model/Typed.java
+++ b/src/main/java/org/traccar/model/Typed.java
@@ -1,4 +1,5 @@
/*
+ * Copyright 2020 Anton Tananaev (anton@traccar.org)
* Copyright 2016 Gabor Somogyi (gabor.g.somogyi@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,6 +16,8 @@
*/
package org.traccar.model;
+import java.util.Objects;
+
public class Typed {
private String type;
@@ -30,4 +33,20 @@ public class Typed {
public void setType(String type) {
this.type = type;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return Objects.equals(type, ((Typed) o).type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type);
+ }
}