Skip to content

Commit 4dae521

Browse files
committed
[JXR-158] StringEntry shouldn't be Comparable
1 parent 052d865 commit 4dae521

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323
* A StringEntry represents a value found by the tokenizer. The index is where
2424
* this StringEntry was found in the source string
2525
*/
26-
public class StringEntry
27-
implements Comparable<StringEntry>
26+
public final class StringEntry
2827
{
28+
private final String value;
2929

30-
private String value = null;
31-
32-
private int index = 0;
30+
private final int index;
3331

3432
/**
3533
* Constructor for the StringEntry object
@@ -60,18 +58,5 @@ public String toString()
6058
{
6159
return this.value;
6260
}
63-
64-
/**
65-
* Compare two objects for equality.
66-
*/
67-
@Override
68-
public int compareTo( StringEntry se )
69-
{
70-
//right now only sort by the index.
71-
72-
return Integer.compare( se.getIndex(), this.getIndex() );
73-
74-
}
75-
7661
}
7762

0 commit comments

Comments
 (0)