Package org.xlsx4j.sml
Class ArrayListSml<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.xlsx4j.sml.ArrayListSml<E>
- Type Parameters:
E-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,java.util.RandomAccess
public class ArrayListSml<E>
extends java.util.ArrayList<E>
Collection which sets parent correctly
- Since:
- 3.3.3
- Author:
- jharrop
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors Constructor Description ArrayListSml(java.lang.Object o) -
Method Summary
Modifier and Type Method Description voidadd(int index, E e)Inserts the specified element at the specified position in this list, checking for common content errors, and setting parent correctly.booleanadd(E e)Appends the specified element to the end of this list, checking for common content errors, and setting parent correctly.booleanaddAll(int index, java.util.Collection<? extends E> c)Inserts all of the elements in the specified collection into this list (checking for common content errors etc), starting at the specified position.booleanaddAll(java.util.Collection<? extends E> c)Appends all of the elements in the specified collection to the end of this list, checking for common content errors, and setting parent correctly.booleancontains(java.lang.Object o)Returns true if this list contains the specified element (or a JAXBElement containing it).java.lang.ObjectgetParent()intindexOf(java.lang.Object o)Returns the index of the first occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.intlastIndexOf(java.lang.Object o)Returns the index of the last occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element.booleanremove(java.lang.Object o)Removes the first occurrence of the specified element (or a JAXBElement containing it) from this list, if it is present.booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)Eset(int index, E e)Replaces the element at the specified position in this list with the specified element, checking for common content errors, and setting parent correctly.Methods inherited from class java.util.ArrayList
clear, clone, ensureCapacity, equals, forEach, get, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeIf, removeRange, replaceAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
ArrayListSml
public ArrayListSml(java.lang.Object o)
-
-
Method Details
-
contains
public boolean contains(java.lang.Object o)Returns true if this list contains the specified element (or a JAXBElement containing it).- Specified by:
containsin interfacejava.util.Collection<E>- Specified by:
containsin interfacejava.util.List<E>- Overrides:
containsin classjava.util.ArrayList<E>- Parameters:
o- element whose presence in this list is to be tested- Returns:
- true if this list contains the specified element
- Since:
- 8.1.4
-
indexOf
public int indexOf(java.lang.Object o)Returns the index of the first occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element. -
lastIndexOf
public int lastIndexOf(java.lang.Object o)Returns the index of the last occurrence of the specified element (or a JAXBElement containing it) in this list, or -1 if this list does not contain the element. -
set
Replaces the element at the specified position in this list with the specified element, checking for common content errors, and setting parent correctly.- Specified by:
setin interfacejava.util.List<E>- Overrides:
setin classjava.util.ArrayList<E>- Parameters:
index- index of the element to replaceelement- element to be stored at the specified position- Returns:
- the element previously at the specified position
- Throws:
java.lang.IndexOutOfBoundsException- Since:
- 8.1.4
-
add
Appends the specified element to the end of this list, checking for common content errors, and setting parent correctly. -
add
Inserts the specified element at the specified position in this list, checking for common content errors, and setting parent correctly. -
remove
public boolean remove(java.lang.Object o)Removes the first occurrence of the specified element (or a JAXBElement containing it) from this list, if it is present. If the list does not contain the element, it is unchanged. -
addAll
Appends all of the elements in the specified collection to the end of this list, checking for common content errors, and setting parent correctly.- Specified by:
addAllin interfacejava.util.Collection<E>- Specified by:
addAllin interfacejava.util.List<E>- Overrides:
addAllin classjava.util.ArrayList<E>- Parameters:
c- collection containing elements to be added to this list- Returns:
- true if this list changed as a result of the call
- Throws:
java.lang.NullPointerException- if the specified collection is null- Since:
- 8.1.4
-
addAll
Inserts all of the elements in the specified collection into this list (checking for common content errors etc), starting at the specified position.- Specified by:
addAllin interfacejava.util.List<E>- Overrides:
addAllin classjava.util.ArrayList<E>- Parameters:
index- index at which to insert the first element from the specified collectionc- collection containing elements to be added to this list- Returns:
- true if this list changed as a result of the call
- Throws:
java.lang.IndexOutOfBoundsExceptionjava.lang.NullPointerException- if the specified collection is null- Since:
- 8.1.4
-
removeAll
public boolean removeAll(java.util.Collection<?> c) -
retainAll
public boolean retainAll(java.util.Collection<?> c) -
getParent
public java.lang.Object getParent()- Returns:
- Since:
- 8.1.4
-