mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-04-03 02:38:55 +02:00
use sortedset instead of treeset
This commit is contained in:
@@ -63,7 +63,7 @@ public class LimitedSortedSet<E> extends ForwardingSortedSet<E>
|
||||
*/
|
||||
public LimitedSortedSet(int maxSize)
|
||||
{
|
||||
this.treeSet = Sets.newTreeSet();
|
||||
this.sortedSet = new TreeSet<E>();
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class LimitedSortedSet<E> extends ForwardingSortedSet<E>
|
||||
*/
|
||||
public LimitedSortedSet(Comparator<E> comparator, int maxSize)
|
||||
{
|
||||
this.treeSet = Sets.newTreeSet(comparator);
|
||||
this.sortedSet = Sets.newTreeSet(comparator);
|
||||
this.maxSize = maxSize;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class LimitedSortedSet<E> extends ForwardingSortedSet<E>
|
||||
@Override
|
||||
protected SortedSet<E> delegate()
|
||||
{
|
||||
return treeSet;
|
||||
return sortedSet;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,5 +139,5 @@ public class LimitedSortedSet<E> extends ForwardingSortedSet<E>
|
||||
private int maxSize;
|
||||
|
||||
/** delegate set */
|
||||
private TreeSet treeSet;
|
||||
private SortedSet<E> sortedSet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user