public class PriorityObject
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
static int |
HIGHER_PRIORITY |
static int |
HIGHEST_PRIORITY |
static int |
LOWER_PRIORITY |
static int |
LOWEST_PRIORITY |
protected java.lang.Object |
object |
protected int |
priority |
Constructor and Description |
---|
PriorityObject(java.lang.Object object) |
PriorityObject(java.lang.Object object,
int priority) |
Modifier and Type | Method and Description |
---|---|
void |
adjustPriority(int amount) |
int |
compareTo(java.lang.Object o) |
java.lang.Object |
getObject() |
int |
getPriority() |
boolean |
isSuperior(PriorityObject priorityObject) |
void |
setObject(java.lang.Object newObject) |
void |
setPriority(int newPriority) |
java.lang.String |
toString() |
public static final int HIGHEST_PRIORITY
public static final int HIGHER_PRIORITY
public static final int DEFAULT_PRIORITY
public static final int LOWER_PRIORITY
public static final int LOWEST_PRIORITY
protected int priority
protected java.lang.Object object
public PriorityObject(java.lang.Object object)
public PriorityObject(java.lang.Object object, int priority)
public int getPriority()
public void setPriority(int newPriority)
public boolean isSuperior(PriorityObject priorityObject)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.Object getObject()
public void setObject(java.lang.Object newObject)
public void adjustPriority(int amount)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2004-2015 Wandora Team