// skip all properties whose value is a closure
def map = new ObservableMap( {!(it instanceof Closure)} )
// skip all properties whose name matches a regex
def map = new ObservableMap( { 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
Bound properties
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static class | |
| public static class | |
| public static class | |
| public abstract static class | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| private final Map | |
| private final PropertyChangeSupport | |
| public static final String | |
| private final Closure |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | clear()
Implements java. |
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Implements java. true if this map contains a mapping for the specified
key.
|
| public boolean | containsValue(Object
value whose presence in this map is to be tested value)Implements java. true if this map maps one or more keys to the
specified value.
|
| public Set | entrySet()
Implements java. Set view of the mappings contained in this map.
|
| public boolean | equals(Object
object to be compared for equality with this map o)Overrides java. Implements java. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public Object | get(Object
the key whose associated value is to be returned key)Implements java. null if this map contains no mapping for the key.
|
| public Map | |
| protected Map | |
| public PropertyChangeListener[] | |
| public PropertyChangeListener[] | |
| public int | |
| protected Closure | |
| public int | hashCode()
Overrides java. Implements java. |
| public boolean | |
| public boolean | |
| public Set | |
| public Object | put(Object
key with which the specified value is to be associated key, Object value to be associated with the specified key value)Implements java. |
| public void | putAll(Map<K, V>
mappings to be stored in this map map)Implements java. |
| public Object | remove(Object
key whose mapping is to be removed from the map key)Implements java. |
| public void | |
| public void | |
| public int | |
| public Collection | values()
Implements java. Collection view of the values contained in this map.
|
| CLEARED_PROPERTY | back to summary |
|---|---|
| public static final String CLEARED_PROPERTY | |
| CONTENT_PROPERTY | back to summary |
|---|---|
| public static final String CONTENT_PROPERTY | |
| delegate | back to summary |
|---|---|
| private final Map<K, V> delegate | |
| pcs | back to summary |
|---|---|
| private final PropertyChangeSupport pcs | |
| SIZE_PROPERTY | back to summary |
|---|---|
| public static final String SIZE_PROPERTY | |
| test | back to summary |
|---|---|
| private final Closure<V> test | |
| ObservableMap | back to summary |
|---|---|
| public ObservableMap() | |
| ObservableMap | back to summary |
|---|---|
| public ObservableMap(Closure<V> test) | |
| ObservableMap | back to summary |
|---|---|
| public ObservableMap(Map<K, V> delegate) | |
| ObservableMap | back to summary |
|---|---|
| public ObservableMap(Map<K, V> delegate, Closure<V> test) | |
| addPropertyChangeListener | back to summary |
|---|---|
| public void addPropertyChangeListener(PropertyChangeListener listener) | |
| addPropertyChangeListener | back to summary |
|---|---|
| public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) | |
| clear | back to summary |
|---|---|
| public void clear() Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map will be empty after this call returns. | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements java. Doc from java. Returns
| |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements java. Doc from java. Returns
| |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Implements java. Doc from java. Compares the specified object with this map for equality. Returns
| |
| fireMultiPropertyEvent | back to summary |
|---|---|
| protected void fireMultiPropertyEvent(List<ObservableMap. | |
| fireMultiPropertyEvent | back to summary |
|---|---|
| protected void fireMultiPropertyEvent(ObservableMap. | |
| firePropertyAddedEvent | back to summary |
|---|---|
| protected void firePropertyAddedEvent(Object key, Object value) | |
| firePropertyClearedEvent | back to summary |
|---|---|
| protected void firePropertyClearedEvent(Map<K, V> values) | |
| firePropertyEvent | back to summary |
|---|---|
| protected void firePropertyEvent(ObservableMap. | |
| firePropertyRemovedEvent | back to summary |
|---|---|
| protected void firePropertyRemovedEvent(Object key, Object value) | |
| firePropertyUpdatedEvent | back to summary |
|---|---|
| protected void firePropertyUpdatedEvent(Object key, Object oldValue, Object newValue) | |
| fireSizeChangedEvent | back to summary |
|---|---|
| protected void fireSizeChangedEvent(int oldValue, int newValue) | |
| get | back to summary |
|---|---|
| public Object get(Object key) Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| getContent | back to summary |
|---|---|
| public Map | |
| getMapDelegate | back to summary |
|---|---|
| protected Map | |
| getPropertyChangeListeners | back to summary |
|---|---|
| public PropertyChangeListener[] getPropertyChangeListeners() | |
| getPropertyChangeListeners | back to summary |
|---|---|
| public PropertyChangeListener[] getPropertyChangeListeners(String propertyName) | |
| getSize | back to summary |
|---|---|
| public int getSize() | |
| getTest | back to summary |
|---|---|
| protected Closure | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements java. Doc from java. Returns the hash code value for this map. The hash code of a map is
defined to be the sum of the hash codes of each entry in the map's
| |
| hasListeners | back to summary |
|---|---|
| public boolean hasListeners(String propertyName) | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| keySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a
| |
| put | back to summary |
|---|---|
| public Object put(Object key, Object value) Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public void putAll(Map<K, V> map) Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling
| |
| remove | back to summary |
|---|---|
| public Object remove(Object key) Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| removePropertyChangeListener | back to summary |
|---|---|
| public void removePropertyChangeListener(PropertyChangeListener listener) | |
| removePropertyChangeListener | back to summary |
|---|---|
| public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) | |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| values | back to summary |
|---|---|
| public Collection Implements java. Doc from java. Returns a
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final ObservableMap. | |
| public static final ObservableMap. | |
| public static final ObservableMap. | |
| public static final Object | |
| public static final ObservableMap. | |
| public static final Object | |
| public static final ObservableMap. | |
| public static final ObservableMap. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ObservableMap. | |
| public static ObservableMap. | |
| public static ObservableMap. |
| ADDED | back to summary |
|---|---|
| public static final ObservableMap. | |
| CLEARED | back to summary |
|---|---|
| public static final ObservableMap. | |
| MULTI | back to summary |
|---|---|
| public static final ObservableMap. | |
| newValue | back to summary |
|---|---|
| public static final Object newValue | |
| NONE | back to summary |
|---|---|
| public static final ObservableMap. | |
| oldValue | back to summary |
|---|---|
| public static final Object oldValue | |
| REMOVED | back to summary |
|---|---|
| public static final ObservableMap. | |
| UPDATED | back to summary |
|---|---|
| public static final ObservableMap. | |
| ChangeType | back to summary |
|---|---|
| private ChangeType() | |
| resolve | back to summary |
|---|---|
| public static ObservableMap. | |
| valueOf | back to summary |
|---|---|
| public static ObservableMap. | |
| values | back to summary |
|---|---|
| public static ObservableMap. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final ObservableMap. | |
| private final ObservableMap. | |
| public static final String | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ObservableMap. |
| EMPTY_PROPERTY_EVENTS | back to summary |
|---|---|
| private static final ObservableMap. | |
| events | back to summary |
|---|---|
| private final ObservableMap. | |
| MULTI_PROPERTY | back to summary |
|---|---|
| public static final String MULTI_PROPERTY | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides groovy. | |
| MultiPropertyEvent | back to summary |
|---|---|
| public MultiPropertyEvent(Object source, ObservableMap. | |
| getEvents | back to summary |
|---|---|
| public ObservableMap. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides groovy. | |
| PropertyAddedEvent | back to summary |
|---|---|
| public PropertyAddedEvent(Object source, String propertyName, Object newValue) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Map |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides groovy. | |
| values | back to summary |
|---|---|
| private Map<K, V> values | |
| PropertyClearedEvent | back to summary |
|---|---|
| public PropertyClearedEvent(Object source, Map<K, V> values) | |
| getValues | back to summary |
|---|---|
| public Map | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private ObservableMap. |
| Access | Constructor and Description |
|---|---|
| public | PropertyEvent(Object source, String propertyName, Object oldValue, Object newValue, ObservableMap.
|
| Modifier and Type | Method and Description |
|---|---|
| public ObservableMap. | |
| public int | |
| public String |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| type | back to summary |
|---|---|
| private ObservableMap. | |
| PropertyEvent | back to summary |
|---|---|
| public PropertyEvent(Object source, String propertyName, Object oldValue, Object newValue, ObservableMap. | |
| getChangeType | back to summary |
|---|---|
| public ObservableMap. | |
| getType | back to summary |
|---|---|
| public int getType() | |
| getTypeAsString | back to summary |
|---|---|
| public String getTypeAsString() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides groovy. | |
| PropertyRemovedEvent | back to summary |
|---|---|
| public PropertyRemovedEvent(Object source, String propertyName, Object oldValue) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides groovy. | |
| PropertyUpdatedEvent | back to summary |
|---|---|
| public PropertyUpdatedEvent(Object source, String propertyName, Object oldValue, Object newValue) | |