Revision 104,
1.0 KB
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[104] | 1 | package schedframe.scheduling; |
---|
| 2 | |
---|
| 3 | import java.util.List; |
---|
| 4 | |
---|
| 5 | import org.joda.time.DateTime; |
---|
| 6 | |
---|
| 7 | /** |
---|
| 8 | * Class for managing a queue of objects. |
---|
| 9 | * |
---|
| 10 | * @author Ariel |
---|
| 11 | * @param <K> The type of the elements in the queue. |
---|
| 12 | * |
---|
| 13 | */ |
---|
| 14 | public interface Queue<K> extends List<K> { |
---|
| 15 | |
---|
| 16 | /** |
---|
| 17 | * Gets a queue name |
---|
| 18 | * @return name |
---|
| 19 | */ |
---|
| 20 | public String getName(); |
---|
| 21 | |
---|
| 22 | /** |
---|
| 23 | * Sets a queue name |
---|
| 24 | * @param name the name to set |
---|
| 25 | */ |
---|
| 26 | public void setName(String name); |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * Gets a queue priority |
---|
| 30 | * @return priority |
---|
| 31 | */ |
---|
| 32 | public int getPriority(); |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | public boolean supportReservations(); |
---|
| 36 | |
---|
| 37 | /** |
---|
| 38 | * Sets a queue priority |
---|
| 39 | * @param priority the priority to set |
---|
| 40 | */ |
---|
| 41 | public void setPriority(int priority); |
---|
| 42 | |
---|
| 43 | /** |
---|
| 44 | * Gets arrival time of the object at position pos in a queue. |
---|
| 45 | * @param pos the position of the object |
---|
| 46 | * @return time when the object at position pos in queue was added to the queue; |
---|
| 47 | * @throws IndexOutOfBoundsException if pos id out of the queue range |
---|
| 48 | */ |
---|
| 49 | public DateTime getArrivalTime(int pos) throws IndexOutOfBoundsException; |
---|
| 50 | |
---|
| 51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.