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

📄 tablesubsetrecorditerator.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
// **********************************************************************// <copyright>//  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// </copyright>// **********************************************************************// $Source: /cvs/distapps/openmap/src/vpfservlet/WEB-INF/src/com/bbn/openmap/vpfservlet/TableSubsetRecordIterator.java,v $// $Revision: 1.2.2.2 $ $Date: 2005/08/11 21:03:07 $ $Author: dietrick $// **********************************************************************package com.bbn.openmap.vpfservlet;import java.util.ArrayList;import java.util.Iterator;import java.util.List;import com.bbn.openmap.io.FormatException;import com.bbn.openmap.layer.vpf.DcwRecordFile;/** * An iterator that will return a subset of the rows in a table. */public class TableSubsetRecordIterator implements Iterator {    final private int vals[];    final DcwRecordFile drf;    final List l;    private int current = 0;    public TableSubsetRecordIterator(int vals[], DcwRecordFile drf, List l) {        this.vals = vals;        this.drf = drf;        this.l = l;    }    /**     * Constructor     *      * @param drf the table to parse     * @param vals the row numbers to be returned     */    public TableSubsetRecordIterator(int vals[], DcwRecordFile drf) {        this(vals, drf, new ArrayList(drf.getColumnCount()));    }    public boolean hasNext() {        return (current < vals.length);    }    public Object next() {        boolean gotit;        try {            gotit = drf.getRow(l, vals[current++]);        } catch (FormatException fe) {            System.out.println("fe: " + fe);            gotit = false;        }        return gotit ? l : null;    }    public void remove() {        throw new UnsupportedOperationException();    }}

⌨️ 快捷键说明

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