Capacity Context Modify Command (#35)
* add: modify capacity command * update: version increment
This commit is contained in:
@@ -17,7 +17,7 @@ export class Queue<T> implements IQueue<T> {
|
||||
* Set up Queue
|
||||
* @param capacity max length of queue
|
||||
*/
|
||||
constructor(private capacity: number = 5) {}
|
||||
constructor(public capacity: number = 5) {}
|
||||
|
||||
/**
|
||||
* Put item in front of queue
|
||||
@@ -59,12 +59,4 @@ export class Queue<T> implements IQueue<T> {
|
||||
getItems(): T[] {
|
||||
return this.storage
|
||||
}
|
||||
|
||||
/**
|
||||
* Get capacity of the queue
|
||||
* @returns capacity of queue
|
||||
*/
|
||||
getCapacity(): number {
|
||||
return this.capacity
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user