1 package be
.nikiroo
.jexer
;
3 import java
.util
.Collection
;
4 import java
.util
.Iterator
;
6 import java
.util
.ListIterator
;
8 public class TTableLine
implements List
<String
> {
9 //TODO: in TTable: default to header of size 1
10 private List
<String
> list
;
12 public TTableLine(List
<String
> list
) {
16 // TODO: override this and the rest shall follow
17 protected List
<String
> getList() {
23 return getList().size();
27 public boolean isEmpty() {
28 return getList().isEmpty();
32 public boolean contains(Object o
) {
33 return getList().contains(o
);
37 public Iterator
<String
> iterator() {
38 return getList().iterator();
42 public Object
[] toArray() {
43 return getList().toArray();
47 public <T
> T
[] toArray(T
[] a
) {
48 return getList().toArray(a
);
52 public boolean containsAll(Collection
<?
> c
) {
53 return getList().containsAll(c
);
57 public String
get(int index
) {
58 return getList().get(index
);
62 public int indexOf(Object o
) {
63 return getList().indexOf(o
);
67 public int lastIndexOf(Object o
) {
68 return getList().lastIndexOf(o
);
72 public List
<String
> subList(int fromIndex
, int toIndex
) {
73 return getList().subList(fromIndex
, toIndex
);
77 public ListIterator
<String
> listIterator() {
78 return getList().listIterator();
82 public ListIterator
<String
> listIterator(int index
) {
83 return getList().listIterator(index
);
87 public boolean add(String e
) {
88 throw new UnsupportedOperationException("Read-only collection");
92 public boolean remove(Object o
) {
93 throw new UnsupportedOperationException("Read-only collection");
97 public boolean addAll(Collection
<?
extends String
> c
) {
98 throw new UnsupportedOperationException("Read-only collection");
102 public boolean addAll(int index
, Collection
<?
extends String
> c
) {
103 throw new UnsupportedOperationException("Read-only collection");
107 public boolean removeAll(Collection
<?
> c
) {
108 throw new UnsupportedOperationException("Read-only collection");
112 public boolean retainAll(Collection
<?
> c
) {
113 throw new UnsupportedOperationException("Read-only collection");
117 public void clear() {
118 throw new UnsupportedOperationException("Read-only collection");
122 public String
set(int index
, String element
) {
123 throw new UnsupportedOperationException("Read-only collection");
127 public void add(int index
, String element
) {
128 throw new UnsupportedOperationException("Read-only collection");
132 public String
remove(int index
) {
133 throw new UnsupportedOperationException("Read-only collection");