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

📄 initialcollection.java

📁 Spring +Web 的完整 MyEclipse 项目源码,使用者可以作为入门材料可以在此基础上深入学习
💻 JAVA
字号:
package org.bit.demo;

import java.util.ArrayList;
import org.bit.demo.DocCollection;

public class InitialCollection {
	private ArrayList collectionList;

	private boolean everIndexed;

	public InitialCollection() {
		collectionList = new ArrayList();
		this.everIndexed = false;
	}

	public void set(int pos, DocCollection d) {
		collectionList.set(pos, d);
	}

	public void add(DocCollection d) {
		collectionList.add(d);
	}

	public boolean isEmpty() {
		return collectionList.isEmpty();
	}

	public int size() {
		return collectionList.size();
	}

	public DocCollection get(int i) {
		return (DocCollection) collectionList.get(i);
	}

	public int indexedNum() {
		int num = 0;
		for (int i = 0; i < collectionList.size(); i++) {
			DocCollection d = (DocCollection) collectionList.get(i);
			if (d.isIndexed())
				num++;
		}
		return num;
	}

	public void delete(int index) {
		collectionList.remove(index);
	}

	public void everIndexed() {
		this.everIndexed = true;
	}

	public boolean getEverIndexed() {
		return this.everIndexed;
	}
}

⌨️ 快捷键说明

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