Errai 3.0.1-SNAPSHOT

org.jboss.errai.databinding.client
Class BindableListWrapper<M>

java.lang.Object
  extended by org.jboss.errai.databinding.client.BindableListWrapper<M>
Type Parameters:
M -
All Implemented Interfaces:
Iterable<M>, Collection<M>, List<M>

public class BindableListWrapper<M>
extends Object
implements List<M>

Wraps a List to notify change handlers of all operations that mutate the underlying list.

Author:
Christian Sadilek , Max Barkley

Nested Class Summary
 class BindableListWrapper.BindableListIterator
          Wraps an Iterator or ListIterator to notify change handlers of all operations that mutate the underlying list.
 
Constructor Summary
BindableListWrapper(List<M> list)
           
 
Method Summary
 void add(int index, M element)
           
 boolean add(M element)
           
 boolean addAll(Collection<? extends M> c)
           
 boolean addAll(int index, Collection<? extends M> c)
           
 void addChangeHandler(BindableListChangeHandler<M> handler)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 M get(int index)
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<M> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<M> listIterator()
           
 ListIterator<M> listIterator(int index)
           
 M remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 void removeChangeHandler(BindableListChangeHandler<M> handler)
           
 boolean retainAll(Collection<?> c)
           
 M set(int index, M element)
           
 int size()
           
 List<M> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

BindableListWrapper

public BindableListWrapper(List<M> list)
Method Detail

add

public boolean add(M element)
Specified by:
add in interface Collection<M>
Specified by:
add in interface List<M>

add

public void add(int index,
                M element)
Specified by:
add in interface List<M>

addAll

public boolean addAll(Collection<? extends M> c)
Specified by:
addAll in interface Collection<M>
Specified by:
addAll in interface List<M>

addAll

public boolean addAll(int index,
                      Collection<? extends M> c)
Specified by:
addAll in interface List<M>

clear

public void clear()
Specified by:
clear in interface Collection<M>
Specified by:
clear in interface List<M>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<M>
Specified by:
contains in interface List<M>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<M>
Specified by:
containsAll in interface List<M>

get

public M get(int index)
Specified by:
get in interface List<M>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<M>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<M>
Specified by:
isEmpty in interface List<M>

iterator

public Iterator<M> iterator()
Specified by:
iterator in interface Iterable<M>
Specified by:
iterator in interface Collection<M>
Specified by:
iterator in interface List<M>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<M>

listIterator

public ListIterator<M> listIterator()
Specified by:
listIterator in interface List<M>

listIterator

public ListIterator<M> listIterator(int index)
Specified by:
listIterator in interface List<M>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<M>
Specified by:
remove in interface List<M>

remove

public M remove(int index)
Specified by:
remove in interface List<M>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<M>
Specified by:
removeAll in interface List<M>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<M>
Specified by:
retainAll in interface List<M>

set

public M set(int index,
             M element)
Specified by:
set in interface List<M>

size

public int size()
Specified by:
size in interface Collection<M>
Specified by:
size in interface List<M>

subList

public List<M> subList(int fromIndex,
                       int toIndex)
Specified by:
subList in interface List<M>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<M>
Specified by:
toArray in interface List<M>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<M>
Specified by:
toArray in interface List<M>

addChangeHandler

public void addChangeHandler(BindableListChangeHandler<M> handler)

removeChangeHandler

public void removeChangeHandler(BindableListChangeHandler<M> handler)

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.