Package org.lionsoul.jcseg.util
Class IHashQueue<T extends IWord>
- java.lang.Object
-
- org.lionsoul.jcseg.util.IHashQueue<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIHashQueue.Entry<T>innner Entry node class
-
Constructor Summary
Constructors Constructor Description IHashQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T word)append a item from the tailbooleancontains(T word)check the specifield T is aleady exists in the queue or notTremove()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 null.intsize()get the size of the queue
-
-
-
Method Detail
-
add
public boolean add(T word)
append a item from the tail- Parameters:
word-- Returns:
- boolean
-
contains
public boolean contains(T word)
check the specifield T is aleady exists in the queue or not- Parameters:
word-- Returns:
- boolean
-
remove
public T remove()
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 null.
-
size
public int size()
get the size of the queue- Returns:
- int
-
-