view test/mergertest/REPTextWithLinkedList.java @ 420:5c95a9020e31

Modify ServerMainLoop
author one
date Fri, 13 Feb 2009 19:13:50 +0900
parents
children
line wrap: on
line source

package test.mergertest;

import java.util.ArrayList;
import java.util.List;

import test.editortest.REPText;
import test.editortest.REPTextListener;

public class REPTextWithLinkedList implements REPText {
	
	ArrayList<String> textList = new ArrayList<String>();

	public void addTextListener(REPTextListener listener) {
		// TODO Auto-generated method stub

	}

	public String delete(int lineno) {
		return null;
	}

	public String get(int i) {
		// TODO Auto-generated method stub
		return null;
	}

	public void insert(int lineno, String text) {
		int d = lineno - textList.size() + 1;

		for(int i = 0; i < d; i++){
			textList.add("");
		}

		textList.add(lineno, text);
	}

	public List<String> list() {
		// TODO Auto-generated method stub
		return textList;
	}

	public int size() {
		// TODO Auto-generated method stub
		return 0;
	}

}