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

📄 closeablearraylist.java

📁 shape file read and write
💻 JAVA
字号:
/**
 * 
 */
package org.geotools.data.shapefile.indexed;

import java.io.IOException;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Iterator;

import org.geotools.index.CloseableCollection;
import org.geotools.index.Data;

/**
 * Currently just wraps ArrayList and delegates to that class
 * @author jesse
 */
public class CloseableArrayList extends AbstractList<Data> implements
        CloseableCollection<Data> {

    private final ArrayList<Data> container ;

    public CloseableArrayList(int length) {
        container = new ArrayList<Data>(length);
    }

    public CloseableArrayList() {
        container = new ArrayList<Data>();
    }

    @Override
    public Data get(int index) {
        return container.get(index);
    }

    @Override
    public int size() {
        return container.size();
    }

    
    public void close() throws IOException {
        // do nothing
        
    }

    public boolean add(Data o) {
        return container.add(o);
    }

    public void closeIterator( Iterator<Data> iter ) throws IOException {
        // do nothing
    }
    
}

⌨️ 快捷键说明

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