source: java/main/src/main/java/com/framsticks/util/dispatching/RunnableQueue.java @ 193

Last change on this file since 193 was 193, checked in by Maciej Komosinski, 10 years ago

Set svn:eol-style native for all textual files

  • Property svn:eol-style set to native
File size: 439 bytes
Line 
1package com.framsticks.util.dispatching;
2
3import java.util.LinkedList;
4
5public class RunnableQueue<C> {
6
7        protected final LinkedList<RunAt<? extends C>> queue = new LinkedList<>();
8
9        public boolean isEmpty() {
10                return queue.isEmpty();
11        }
12
13        public RunAt<? extends C> pollFirst() {
14                return queue.pollFirst();
15        }
16
17        public void push(RunAt<? extends C> runnable) {
18                queue.add(runnable);
19        }
20
21        public int size() {
22                return queue.size();
23        }
24
25}
Note: See TracBrowser for help on using the repository browser.