Package io.toro.martini.util
Class EnhancedStack<E>
java.lang.Object
io.toro.martini.util.EnhancedStack<E>
Stack that avoids duplicated element. If an duplicated element is pushed, instead of
inserting the element into the stack resulting in increase of stack size
it will increment the item count counter instead.
Caution when using this class in multiple thread as this class is not thread safe.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EnhancedStack
public EnhancedStack()
-
-
Method Details
-
getInternalStack
Stack<EnhancedStack<E>.io.toro.martini.util.EnhancedStack.Item> getInternalStack() -
peek
-
push
-
size
public int size() -
empty
public boolean empty() -
pop
-