Package jsl.modeling.elements.entity
Class RequestQueue
- java.lang.Object
-
- jsl.modeling.elements.entity.RequestQueue
-
public class RequestQueue extends java.lang.Object
This class encapsulates the holding of Requests for resources.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Request>
myRequests
Holds requests that are waiting for some units of the resource
-
Constructor Summary
Constructors Constructor Description RequestQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Request request)
Adds the request to the list of waiting requests based on the Comparable interface for Requestvoid
clear()
boolean
contains(Request arg0)
boolean
containsAll(java.util.Collection<Request> arg0)
Request
get(int arg0)
int
indexOf(Request arg0)
boolean
isEmpty()
java.util.Iterator<Request>
iterator()
int
lastIndexOf(Request arg0)
java.util.ListIterator<Request>
listIterator()
java.util.ListIterator<Request>
listIterator(int arg0)
Request
remove(int arg0)
boolean
remove(Request arg0)
Request
set(int arg0, Request arg1)
int
size()
-
-
-
Field Detail
-
myRequests
protected java.util.List<Request> myRequests
Holds requests that are waiting for some units of the resource
-
-
Method Detail
-
add
public void add(Request request)
Adds the request to the list of waiting requests based on the Comparable interface for Request- Parameters:
request
-
-
size
public int size()
-
remove
public Request remove(int arg0)
-
remove
public boolean remove(Request arg0)
-
listIterator
public java.util.ListIterator<Request> listIterator(int arg0)
-
listIterator
public java.util.ListIterator<Request> listIterator()
-
lastIndexOf
public int lastIndexOf(Request arg0)
-
iterator
public java.util.Iterator<Request> iterator()
-
isEmpty
public boolean isEmpty()
-
indexOf
public int indexOf(Request arg0)
-
get
public Request get(int arg0)
-
containsAll
public boolean containsAll(java.util.Collection<Request> arg0)
-
contains
public boolean contains(Request arg0)
-
clear
public void clear()
-
-