first commit

This commit is contained in:
2025-07-28 13:56:49 +05:30
commit e9eb805edb
3438 changed files with 520990 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package org.nfunk.jep.function;
import java.util.Stack;
import java.util.Vector;
import org.nfunk.jep.ParseException;
public class List extends PostfixMathCommand {
public void run(Stack paramStack) throws ParseException {
checkStack(paramStack);
if (this.curNumberOfParameters < 1)
throw new ParseException("Empty list");
Vector vector = new Vector(this.curNumberOfParameters);
vector.setSize(this.curNumberOfParameters);
for (int i = this.curNumberOfParameters - 1; i >= 0; i--) {
Object object = paramStack.pop();
vector.setElementAt(object, i);
}
paramStack.push(vector);
}
}