public class RList<E> extends RCollection<E> implements List<E>
remove(java.lang.Object)
will not trigger a
notification if the removed element is not present in the list. Use removeForce(E)
to
force a notification.Modifier and Type | Class and Description |
---|---|
static class |
RList.Listener<E>
Publishes list events to listeners.
|
Reactor.RListener
Constructor and Description |
---|
RList(List<E> impl)
Creates a reactive list with the supplied underlying list implementation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E element) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> collection) |
boolean |
addAll(int index,
Collection<? extends E> elements) |
void |
clear() |
Connection |
connect(RList.Listener<? super E> listener)
Connects the supplied listener to this list, such that it will be notified on adds and
removes.
|
Connection |
connectNotify(RList.Listener<? super E> listener)
Invokes
onAdd(int,E) for all existing list elements, then connects listener . |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
static <E> RList<E> |
create()
Creates a reactive list backed by an
ArrayList . |
static <E> RList<E> |
create(List<E> impl)
Creates a reactive list with the supplied underlying list implementation.
|
void |
disconnect(RList.Listener<? super E> listener)
Disconnects the supplied listener from this list if listen was called with it.
|
boolean |
equals(Object other) |
E |
get(int index) |
int |
hashCode() |
int |
indexOf(Object element) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object element) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> collection) |
boolean |
removeForce(E elem)
Removes the supplied element from the list, forcing a notification to the listeners
regardless of whether the element was in the list or not.
|
boolean |
retainAll(Collection<?> collection) |
E |
set(int index,
E element) |
int |
size()
Returns the number of elements in this collection.
|
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
isEmptyView, isNonEmptyView, sizeView
clearConnections, hasConnections
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public static <E> RList<E> create(List<E> impl)
public Connection connect(RList.Listener<? super E> listener)
public Connection connectNotify(RList.Listener<? super E> listener)
onAdd(int,E)
for all existing list elements, then connects listener
.public void disconnect(RList.Listener<? super E> listener)
public boolean removeForce(E elem)
public boolean add(E element)
public boolean addAll(Collection<? extends E> collection)
public boolean addAll(int index, Collection<? extends E> elements)
public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
public boolean retainAll(Collection<?> collection)
public boolean removeAll(Collection<?> collection)
public boolean remove(Object object)
public boolean equals(Object other)
public int hashCode()
public int size()
RCollection
size
in interface Collection<E>
size
in interface List<E>
size
in class RCollection<E>
public boolean isEmpty()
public int lastIndexOf(Object element)
lastIndexOf
in interface List<E>
public boolean contains(Object object)
public boolean containsAll(Collection<?> collection)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
public void clear()
public Object[] toArray()
Copyright © 2017. All rights reserved.