⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listitems.java

📁 A framework written in Java for implementing high-level and dynamic languages, compiling them into J
💻 JAVA
字号:
// Copyright (c) 2002  Per M.A. Bothner and Brainfood Inc.// This is free software;  for terms and warranty disclaimer see ./COPYING.package gnu.kawa.xml;import gnu.mapping.*;import gnu.lists.*;/* #ifdef JAVA2 */import java.util.Iterator;import java.util.List;/* #endif *//** A function that maps a List into the sequence of its elements. */public class ListItems extends MethodProc{  public static ListItems listItems = new ListItems();  public void apply (CallContext ctx)  {    Consumer out = ctx.consumer;    Object arg = ctx.getNextArg();    ctx.lastArg();    /* #ifdef JAVA2 */    List list = (List) arg;    if (arg instanceof AbstractSequence)      {	((AbstractSequence) arg).consumePosRange(0, -1, out);	return;      }    Iterator iter = list.iterator();    while (iter.hasNext())      {	Object val = iter.next();	Values.writeValues(val, out);      }    /* #endif */    /* #ifndef JAVA2 */    // ((AbstractSequence) arg).consumePosRange(0, -1, out);    /* #endif */  }}

⌨️ 快捷键说明

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