- java.lang.Object
-
- com.appslandia.common.base.FluentList<E>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<E>,Collection<E>,List<E>,RandomAccess
public class FluentList<E> extends Object implements List<E>, RandomAccess, Cloneable, Serializable
- Author:
- Loc Ha
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FluentList()FluentList(List<E> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, E element)booleanadd(E e)booleanaddAll(int index, Collection<? extends E> c)booleanaddAll(Collection<? extends E> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)Efirst()FluentList<E>first(E e)Eget(int index)inthashCode()intindexOf(Object o)FluentList<E>ins(int index, E e)FluentList<E>ins(int index, Collection<? extends E> c)FluentList<E>ins(E e)FluentList<E>ins(Collection<? extends E> c)booleanisEmpty()Iterator<E>iterator()Elast()FluentList<E>last(E e)intlastIndexOf(Object o)ListIterator<E>listIterator()ListIterator<E>listIterator(int index)Eremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)FluentList<E>removeFirst()FluentList<E>removeLast()voidreplaceAll(UnaryOperator<E> operator)booleanretainAll(Collection<?> c)Eset(int index, E element)intsize()voidsort(Comparator<? super E> c)List<E>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
spliterator
-
-
-
-
Method Detail
-
first
public FluentList<E> first(E e)
-
last
public FluentList<E> last(E e)
-
ins
public FluentList<E> ins(E e)
-
ins
public FluentList<E> ins(int index, E e)
-
ins
public FluentList<E> ins(int index, Collection<? extends E> c)
-
ins
public FluentList<E> ins(Collection<? extends E> c)
-
first
public E first()
- Throws:
NoSuchElementException- if this list is empty
-
last
public E last()
- Throws:
NoSuchElementException- if this list is empty
-
removeFirst
public FluentList<E> removeFirst()
- Throws:
NoSuchElementException- if this list is empty
-
removeLast
public FluentList<E> removeLast()
- Throws:
NoSuchElementException- if this list is empty
-
add
public boolean add(E e)
-
addAll
public boolean addAll(Collection<? extends E> c)
-
addAll
public boolean addAll(int index, Collection<? extends E> c)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<E>
-
listIterator
public ListIterator<E> listIterator()
- Specified by:
listIteratorin interfaceList<E>
-
listIterator
public ListIterator<E> listIterator(int index)
- Specified by:
listIteratorin interfaceList<E>
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
replaceAll
public void replaceAll(UnaryOperator<E> operator)
- Specified by:
replaceAllin interfaceList<E>
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
sort
public void sort(Comparator<? super E> c)
-
toArray
public Object[] toArray()
-
-