P
- the type of priorized objectpublic class WithPriority<P> extends Object
PriorizedList
,
PriorityComparator
Constructor and Description |
---|
WithPriority(P priorized,
int priority)
Wraps the priorized object with a priority.
|
Modifier and Type | Method and Description |
---|---|
static <P> Comparator<WithPriority<P>> |
comparator()
Provide a comparator used to sort by priority.
|
int |
getPriority() |
P |
getPriorized() |
String |
toString() |
public WithPriority(P priorized, int priority)
priorized
- the object to priorizepriority
- the associated prioritypublic P getPriorized()
public int getPriority()
public static <P> Comparator<WithPriority<P>> comparator()
P
- the type of priorized objectCopyright © 2021. All rights reserved.