| | |
| | | { |
| | | private static final Logger logger = Logger.getLogger(TextElement.class); |
| | | |
| | | private ArrayList list = new ArrayList(); |
| | | private ArrayList<Element> list = new ArrayList<Element>(); |
| | | |
| | | public TextNodeElement(byte[] raw) |
| | | { |
| | |
| | | return list.contains(o); |
| | | } |
| | | |
| | | public Iterator iterator() |
| | | public Iterator<Element> iterator() |
| | | { |
| | | return list.iterator(); |
| | | } |
| | |
| | | return list.toArray(); |
| | | } |
| | | |
| | | public boolean add(Object o) |
| | | public <T> T[] toArray(T[] ts) |
| | | { |
| | | return list.add(o); |
| | | return list.toArray(ts); |
| | | } |
| | | |
| | | public boolean add(Element element) |
| | | { |
| | | return list.add(element); |
| | | } |
| | | |
| | | public boolean remove(Object o) |
| | |
| | | return list.remove(o); |
| | | } |
| | | |
| | | public boolean addAll(Collection c) |
| | | public boolean containsAll(Collection<?> objects) |
| | | { |
| | | return list.addAll(c); |
| | | return list.containsAll(objects); |
| | | } |
| | | |
| | | public boolean addAll(int index, Collection c) |
| | | public boolean addAll(Collection<? extends Element> elements) |
| | | { |
| | | return list.addAll(index, c); |
| | | return list.addAll(elements); |
| | | } |
| | | |
| | | public boolean addAll(int i, Collection<? extends Element> elements) |
| | | { |
| | | return list.addAll(i, elements); |
| | | } |
| | | |
| | | public boolean removeAll(Collection<?> objects) |
| | | { |
| | | return list.removeAll(objects); |
| | | } |
| | | |
| | | public boolean retainAll(Collection<?> objects) |
| | | { |
| | | return list.retainAll(objects); |
| | | } |
| | | |
| | | public void clear() |
| | |
| | | list.clear(); |
| | | } |
| | | |
| | | public Object get(int index) |
| | | public Element get(int index) |
| | | { |
| | | return list.get(index); |
| | | } |
| | | |
| | | public Object set(int index, Object element) |
| | | public Element set(int index, Element element) |
| | | { |
| | | return list.set(index, element); |
| | | } |
| | | |
| | | public void add(int index, Object element) |
| | | public void add(int index, Element element) |
| | | { |
| | | list.add(index, element); |
| | | } |
| | | |
| | | public Object remove(int index) |
| | | public Element remove(int index) |
| | | { |
| | | return list.remove(index); |
| | | } |
| | |
| | | return list.lastIndexOf(o); |
| | | } |
| | | |
| | | public ListIterator listIterator() |
| | | public ListIterator<Element> listIterator() |
| | | { |
| | | return list.listIterator(); |
| | | } |
| | | |
| | | public ListIterator listIterator(int index) |
| | | public ListIterator<Element> listIterator(int index) |
| | | { |
| | | return list.listIterator(index); |
| | | } |
| | | |
| | | public List subList(int fromIndex, int toIndex) |
| | | public List<Element> subList(int fromIndex, int toIndex) |
| | | { |
| | | return list.subList(fromIndex, toIndex); |
| | | } |
| | | |
| | | public boolean retainAll(Collection c) |
| | | { |
| | | return list.retainAll(c); |
| | | } |
| | | |
| | | public boolean removeAll(Collection c) |
| | | { |
| | | return list.removeAll(c); |
| | | } |
| | | |
| | | public boolean containsAll(Collection c) |
| | | { |
| | | return list.containsAll(c); |
| | | } |
| | | |
| | | public Object[] toArray(Object[] a) |
| | | public Element[] toArray(Element[] a) |
| | | { |
| | | return list.toArray(a); |
| | | } |
| | | |
| | | public String[] getTextArray() |
| | | { |
| | | ArrayList list = new ArrayList(); |
| | | ArrayList<String> list = new ArrayList<String>(); |
| | | |
| | | for (ListIterator it = listIterator(); it.hasNext();) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | return (String[]) list.toArray(new String[list.size()]); |
| | | return list.toArray(new String[list.size()]); |
| | | } |
| | | |
| | | public Geometry toGeometry(GeometryFactory factory) |
| | |
| | | for (Object o : this) |
| | | { |
| | | TextElement textElm = (TextElement) o; |
| | | other.add(textElm.clone()); |
| | | other.add((Element) textElm.clone()); |
| | | } |
| | | |
| | | return other; |