public class ObservableList extends Object implements List
// skip all properties whose value is a closure def map = new ObservableList( {!(it instanceof Closure)} ) <p/> // skip all properties whose name matches a regex def map = new ObservableList( { name, value -> !(name =˜ /[A-Z+]/) } )
The current implementation will trigger specialized events in the following scenarios, you need not register a different listener as those events extend from PropertyChangeEvent
Modifier and Type | Class and Description |
---|---|
static class |
ObservableList.ElementAddedEvent |
static class |
ObservableList.ElementClearedEvent |
static class |
ObservableList.ElementEvent |
static class |
ObservableList.ElementRemovedEvent |
static class |
ObservableList.ElementUpdatedEvent |
static class |
ObservableList.MultiElementAddedEvent |
static class |
ObservableList.MultiElementRemovedEvent |
Constructor and Description |
---|
ObservableList() |
ObservableList(Closure test) |
ObservableList(List delegate) |
ObservableList(List delegate,
Closure test) |
public ObservableList()
public ObservableList(List delegate)
public ObservableList(Closure test)
public boolean add(Object o)
add
in interface Collection
add
in interface List
public boolean addAll(Collection c)
addAll
in interface Collection
addAll
in interface List
public boolean addAll(int index, Collection c)
public void clear()
clear
in interface Collection
clear
in interface List
public boolean contains(Object o)
contains
in interface Collection
contains
in interface List
public boolean containsAll(Collection c)
containsAll
in interface Collection
containsAll
in interface List
public boolean equals(Object o)
public int hashCode()
public boolean isEmpty()
isEmpty
in interface Collection
isEmpty
in interface List
public Iterator iterator()
public int lastIndexOf(Object o)
lastIndexOf
in interface List
public ListIterator listIterator()
listIterator
in interface List
public ListIterator listIterator(int index)
listIterator
in interface List
public boolean remove(Object o)
remove
in interface Collection
remove
in interface List
public boolean removeAll(Collection c)
removeAll
in interface Collection
removeAll
in interface List
public boolean retainAll(Collection c)
retainAll
in interface Collection
retainAll
in interface List
public int size()
size
in interface Collection
size
in interface List
public Object[] toArray()
toArray
in interface Collection
toArray
in interface List
public Object[] toArray(Object[] a)
toArray
in interface Collection
toArray
in interface List
public void addPropertyChangeListener(PropertyChangeListener listener)
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
public PropertyChangeListener[] getPropertyChangeListeners()
public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
public void removePropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
public boolean hasListeners(String propertyName)