Package org.lionsoul.jcseg.util
Class IIntQueue
- java.lang.Object
-
- org.lionsoul.jcseg.util.IIntQueue
-
public class IIntQueue extends Object
char queue class base on double link Not thread safe- Author:
- chenxin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIIntQueue.Entryinnner Entry node class
-
Constructor Summary
Constructors Constructor Description IIntQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdeQueue()remove the node from the head and you should make sure the size is larger than 0 by calling size() before you invoke the method or you will just get -1booleanenQueue(int data)append a int from the tailintsize()get the size of the queue
-
-
-
Method Detail
-
enQueue
public boolean enQueue(int data)
append a int from the tail- Parameters:
data-- Returns:
- boolean
-
deQueue
public int deQueue()
remove the node from the head and you should make sure the size is larger than 0 by calling size() before you invoke the method or you will just get -1
-
size
public int size()
get the size of the queue- Returns:
- int
-
-