root/Weektaken2/Weektaak3/ESB/src/hanze/ga/wt3/channels/ESBQueue.java
| 366 | 368 | ||
|---|---|---|---|
21 | System.out.println("[" + this.getqName() + "] Item was added"); | 21 | System.out.println("[" + this.getqName() + "] Item was added"); |
22 | this.queue.add(input); | 22 | this.queue.add(input); |
23 | } | 23 | } |
24 | | 24 | |
25 | public void deleteFromQueue(String queuedObject) { | 25 | public void deleteFromQueue(String queuedObject) { |
26 | this.queue.remove(queuedObject); | 26 | this.queue.remove(queuedObject); |
27 | } | 27 | } |
... | ... | ||
47 | } | 47 | } |
48 | 48 | ||
49 | /** | 49 | /** |
50 | * Geeft Array terug van hele queue | ||
51 | * | ||
52 | * @return Lijst met alle items | ||
53 | */ | ||
54 | public LinkedList<String> peekEntireQueue() { | ||
55 | return new LinkedList<String>(this.queue); | ||
56 | } | ||
57 | |||
58 | /** | ||
50 | * Removes latest item from the Queue and removes it from the Queue. | 59 | * Removes latest item from the Queue and removes it from the Queue. |
51 | * | 60 | * |
52 | * @return File contents | 61 | * @return File contents |
... | ... | ||
56 | return this.queue.poll(); | 65 | return this.queue.poll(); |
57 | } | 66 | } |
58 | 67 | ||
59 | /** | ||
60 | * Geeft Array terug van hele queue | ||
61 | * | ||
62 | * @return Lijst met alle items | ||
63 | */ | ||
64 | public LinkedList<String> peekEntireQueue() { | ||
65 | return new LinkedList<String>(this.queue); | ||
66 | } | ||
67 | |||
68 | public void setqName(String qName) { | 68 | public void setqName(String qName) { |
69 | this.qName = qName; | 69 | this.qName = qName; |
70 | } | 70 | } |
Download diff