|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.queue.QueueSorter
hudson.model.queue.AbstractQueueSorterImpl
public abstract class AbstractQueueSorterImpl
Partial implementation of QueueSorter
in terms of Comparator
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
Constructor Summary | |
---|---|
AbstractQueueSorterImpl()
|
Method Summary | |
---|---|
protected static int |
compare(int a,
int b)
sign(a-b). |
protected static int |
compare(long a,
long b)
sign(a-b). |
int |
compare(Queue.BuildableItem lhs,
Queue.BuildableItem rhs)
Override this method to provide the ordering of the sort. |
void |
sortBuildableItems(List<Queue.BuildableItem> buildables)
Sorts the buildable items list. |
Methods inherited from class hudson.model.queue.QueueSorter |
---|
all, installDefaultQueueSorter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public AbstractQueueSorterImpl()
Method Detail |
---|
public void sortBuildableItems(List<Queue.BuildableItem> buildables)
QueueSorter
sortBuildableItems
in class QueueSorter
buildables
- List of buildable items in the queue. Never null.public int compare(Queue.BuildableItem lhs, Queue.BuildableItem rhs)
if lhs should be build before rhs, return a negative value. Or put another way, think of the comparison
as a process of converting a Queue.BuildableItem
into a number, then doing num(lhs)-num(rhs).
The default implementation does FIFO.
compare
in interface Comparator<Queue.BuildableItem>
protected static int compare(long a, long b)
protected static int compare(int a, int b)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |