diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/Tag.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/com/juick/Tag.java b/src/main/java/com/juick/Tag.java index 3cee33588..119aad993 100644 --- a/src/main/java/com/juick/Tag.java +++ b/src/main/java/com/juick/Tag.java @@ -17,11 +17,13 @@ */ package com.juick; +import java.util.Objects; + /** * * @author Ugnich Anton */ -public class Tag implements Comparable<Tag> { +public class Tag { public String Name = null; public int TID = 0; @@ -29,7 +31,11 @@ public class Tag implements Comparable<Tag> { public int UsageCnt = 0; @Override - public int compareTo(Tag o) { - return this.Name.compareTo(o.Name); + public boolean equals(Object o) { + boolean equal = false; + if (o != null && o instanceof Tag) { + equal = Objects.equals(Name, ((Tag) o).Name); + } + return equal; } } |