001package conexp.fx.core.xml;
002
003/*
004 * #%L
005 * Concept Explorer FX
006 * %%
007 * Copyright (C) 2010 - 2023 Francesco Kriegel
008 * %%
009 * This program is free software: you can redistribute it and/or modify
010 * it under the terms of the GNU General Public License as
011 * published by the Free Software Foundation, either version 3 of the
012 * License, or (at your option) any later version.
013 * 
014 * This program is distributed in the hope that it will be useful,
015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
017 * GNU General Public License for more details.
018 * 
019 * You should have received a copy of the GNU General Public
020 * License along with this program.  If not, see
021 * <http://www.gnu.org/licenses/gpl-3.0.html>.
022 * #L%
023 */
024
025
026import java.util.Arrays;
027import java.util.Collection;
028import java.util.Iterator;
029import java.util.List;
030import java.util.ListIterator;
031
032public class StringListData extends ListData<String> {
033
034  public StringListData(final String key, final String subkey, final List<String> value) throws NullPointerException,
035      IndexOutOfBoundsException {
036    super(Datatype.STRING_LIST, key, subkey, value);
037  }
038
039  public StringListData(final String key, final String subkey, final String... values) throws NullPointerException,
040      IndexOutOfBoundsException {
041    this(key, subkey, Arrays.asList(values));
042  }
043
044  @Override
045  public final boolean add(String value) {
046    return this.value.add(value);
047  }
048
049  @Override
050  public final void add(int index, String value) {
051    this.value.add(index, value);
052  }
053
054  @Override
055  public final String set(int index, String value) {
056    return this.value.set(index, value);
057  }
058
059  @Override
060  public final String get(int index) {
061    return value.get(index);
062  }
063
064  @Override
065  public final String remove(int index) {
066    return value.remove(index);
067  }
068
069  @Override
070  public final boolean remove(Object object) {
071    return value.remove(object);
072  }
073
074  @Override
075  public final boolean contains(Object object) {
076    return this.value.contains(object);
077  }
078
079  @Override
080  public final int indexOf(Object object) {
081    return this.value.indexOf(object);
082  }
083
084  @Override
085  public final int lastIndexOf(Object object) {
086    return value.lastIndexOf(object);
087  }
088
089  @Override
090  public final boolean addAll(Collection<? extends String> collection) {
091    return value.addAll(collection);
092  }
093
094  @Override
095  public final boolean addAll(int index, Collection<? extends String> collection) {
096    return value.addAll(index, collection);
097  }
098
099  @Override
100  public final boolean removeAll(Collection<?> collection) {
101    return value.removeAll(collection);
102  }
103
104  @Override
105  public final boolean retainAll(Collection<?> collection) {
106    return value.retainAll(collection);
107  }
108
109  @Override
110  public final boolean containsAll(Collection<?> collection) {
111    return value.containsAll(collection);
112  }
113
114  @Override
115  public final void clear() {
116    value.clear();
117  }
118
119  @Override
120  public final boolean isEmpty() {
121    return value.isEmpty();
122  }
123
124  @Override
125  public final int size() {
126    return value.size();
127  }
128
129  @Override
130  public final Iterator<String> iterator() {
131    return value.iterator();
132  }
133
134  @Override
135  public final ListIterator<String> listIterator() {
136    return value.listIterator();
137  }
138
139  @Override
140  public final ListIterator<String> listIterator(int index) {
141    return value.listIterator(index);
142  }
143
144  @Override
145  public final List<String> subList(int fromIndex, int toIndex) {
146    return value.subList(fromIndex, toIndex);
147  }
148
149  @Override
150  public final Object[] toArray() {
151    return value.toArray();
152  }
153
154  @Override
155  public final <T> T[] toArray(T[] array) {
156    return value.<T> toArray(array);
157  }
158
159}