Skip to content

Commit

Permalink
[JXR-158] StringEntry shouldn't be Comparable
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Apr 18, 2021
1 parent 052d865 commit 4dae521
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions maven-jxr/src/main/java/org/apache/maven/jxr/util/StringEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
* A StringEntry represents a value found by the tokenizer. The index is where
* this StringEntry was found in the source string
*/
public class StringEntry
implements Comparable<StringEntry>
public final class StringEntry
{
private final String value;

private String value = null;

private int index = 0;
private final int index;

/**
* Constructor for the StringEntry object
Expand Down Expand Up @@ -60,18 +58,5 @@ public String toString()
{
return this.value;
}

/**
* Compare two objects for equality.
*/
@Override
public int compareTo( StringEntry se )
{
//right now only sort by the index.

return Integer.compare( se.getIndex(), this.getIndex() );

}

}

0 comments on commit 4dae521

Please sign in to comment.