首页 > 代码库 > JAVA类库LinkList的基本实现

JAVA类库LinkList的基本实现

写完调试了好久,边界不好处理,详细的请看JDK类库,以下只是基本实现:
import java.util.Iterator;

/**
 * 类名:MyLinkedList 说明:LinkedList的基本实现
 */
public class MyLinkedList<AnyType> implements Iterable {
	private int theSize = 0;
	private int modCount = 0;
	private Node<AnyType> beginMarker;
	private Node<AnyType> endMarker;

	private static class Node<AnyType> {
		public Node(AnyType data, Node<AnyType> prev, Node<AnyType> next) {
			this.data = http://www.mamicode.com/data;>

JAVA类库LinkList的基本实现