unionnodes.java

来自「A framework written in Java for implemen」· Java 代码 · 共 39 行

JAVA
39
字号
// Copyright (c) 2003  Per M.A. Bothner.// This is free software;  for terms and warranty disclaimer see ./COPYING.package gnu.kawa.xml;import gnu.bytecode.*;import gnu.mapping.*;import gnu.expr.*;import gnu.kawa.functions.AppendValues;/** Get the union of two node lists. * Implements the XQuery '|' or 'union' operator. */public class UnionNodes extends Procedure2 implements Inlineable{  public static final UnionNodes unionNodes = new UnionNodes();  public Object apply2 (Object vals1, Object vals2)  {    SortedNodes nodes = new SortedNodes();    Values.writeValues(vals1, nodes);    Values.writeValues(vals2, nodes);    return nodes;  }  public void compile (ApplyExp exp, Compilation comp, Target target)  {    exp = new ApplyExp(AppendValues.appendValues, exp.getArgs());    ConsumerTarget.compileUsingConsumer(exp, comp, target,					SortNodes.makeSortedNodesMethod, null);  }  public Type getReturnType (Expression[] args)  {    return Compilation.typeObject;  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?