aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-27 23:19:47 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-27 23:19:47 -0700
commite8291e33039ec3fb56ddc8fc806c5ef4f348039d (patch)
treee44e24daa89c06d7defd90778b70aabe623cedd4 /src/main/java/org/traccar
parent34feb9862f03ad0b10ce6425943a9b43a7d5c71f (diff)
downloadtraccar-server-e8291e33039ec3fb56ddc8fc806c5ef4f348039d.tar.gz
traccar-server-e8291e33039ec3fb56ddc8fc806c5ef4f348039d.tar.bz2
traccar-server-e8291e33039ec3fb56ddc8fc806c5ef4f348039d.zip
More predictable API ordering
Diffstat (limited to 'src/main/java/org/traccar')
-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);
+ }
}