List of utility methods to do Stack Push
int | pushAll(Stack Pushes all elements of a collection into a stack and returns the size of this collection. for (E element : toBePushed) { stack.push(element); return toBePushed.size(); |
void | stackPushUnique(Stack s, Object val) Push a value into a stack if it is not already there if (s == null) { return; int pos = s.indexOf(val); if (pos == -1) { pos = s.size(); s.push(val); |