X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjexer%2FTTableLine.java;fp=src%2Fbe%2Fnikiroo%2Fjexer%2FTTableLine.java;h=f393621c865ed5eec5586d1c5c7a785f51fd3c24;hp=0000000000000000000000000000000000000000;hb=8f34a7954f96acdd5d7be5ed6f08fea2713f7d75;hpb=4162793727db52a12e0efeaca48ac5dbdcb57bdf diff --git a/src/be/nikiroo/jexer/TTableLine.java b/src/be/nikiroo/jexer/TTableLine.java new file mode 100644 index 0000000..f393621 --- /dev/null +++ b/src/be/nikiroo/jexer/TTableLine.java @@ -0,0 +1,135 @@ +package be.nikiroo.jexer; + +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.ListIterator; + +public class TTableLine implements List { + //TODO: in TTable: default to header of size 1 + private List list; + + public TTableLine(List list) { + this.list = list; + } + + // TODO: override this and the rest shall follow + protected List getList() { + return list; + } + + @Override + public int size() { + return getList().size(); + } + + @Override + public boolean isEmpty() { + return getList().isEmpty(); + } + + @Override + public boolean contains(Object o) { + return getList().contains(o); + } + + @Override + public Iterator iterator() { + return getList().iterator(); + } + + @Override + public Object[] toArray() { + return getList().toArray(); + } + + @Override + public T[] toArray(T[] a) { + return getList().toArray(a); + } + + @Override + public boolean containsAll(Collection c) { + return getList().containsAll(c); + } + + @Override + public String get(int index) { + return getList().get(index); + } + + @Override + public int indexOf(Object o) { + return getList().indexOf(o); + } + + @Override + public int lastIndexOf(Object o) { + return getList().lastIndexOf(o); + } + + @Override + public List subList(int fromIndex, int toIndex) { + return getList().subList(fromIndex, toIndex); + } + + @Override + public ListIterator listIterator() { + return getList().listIterator(); + } + + @Override + public ListIterator listIterator(int index) { + return getList().listIterator(index); + } + + @Override + public boolean add(String e) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public boolean remove(Object o) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public boolean addAll(Collection c) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public boolean addAll(int index, Collection c) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public boolean removeAll(Collection c) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public boolean retainAll(Collection c) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public void clear() { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public String set(int index, String element) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public void add(int index, String element) { + throw new UnsupportedOperationException("Read-only collection"); + } + + @Override + public String remove(int index) { + throw new UnsupportedOperationException("Read-only collection"); + } +}