MCPcopy Index your code
hub / github.com/beanshell/beanshell / swap

Method swap

src/bsh/CallStack.java:108–113  ·  view source on GitHub ↗

Swap in the value as the new top of the stack and return the old value.

( NameSpace newTop )

Source from the content-addressed store, hash-verified

106 value.
107 */
108 public NameSpace swap( NameSpace newTop ) {
109 int last = stack.size() - 1;
110 NameSpace oldTop = stack.get(last);
111 stack.set( last, newTop );
112 return oldTop;
113 }
114
115 public int depth() {
116 return stack.size();

Callers 4

evalBlockMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80
evalMethod · 0.80

Calls 3

getMethod · 0.65
sizeMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected