com.scudata.expression.mfn.sequence.Conjx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.expression.mfn.sequence;
import com.scudata.common.MessageManager;
import com.scudata.common.RQException;
import com.scudata.dm.Context;
import com.scudata.dm.Sequence;
import com.scudata.dm.cursor.ConjxCursor;
import com.scudata.dm.cursor.ICursor;
import com.scudata.expression.SequenceFunction;
import com.scudata.resources.EngineMessage;
/**
* ????????α????з??س??α꣬?ṹ?Ե?һ??Ϊ
* CS.conjx()
* @author RunQian
*
*/
public class Conjx extends SequenceFunction {
public Object calculate(Context ctx) {
int len = srcSequence.length();
Sequence cursorSeq = new Sequence(len);
for (int i = 1; i <= len; ++i) {
Object obj = srcSequence.getMem(i);
if (obj instanceof ICursor) {
cursorSeq.add(obj);
} else if (obj != null) {
MessageManager mm = EngineMessage.get();
throw new RQException("conjx" + mm.getMessage("function.paramTypeError"));
}
}
len = cursorSeq.length();
if (len > 0) {
ICursor[] cursors = new ICursor[len];
cursorSeq.toArray(cursors);
return new ConjxCursor(cursors);
} else {
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy