Constructor and Description |
---|
MapProperty(String name)
Constructs a property with the given name
|
MapProperty(String name,
Class genericTypeKey,
Class genericTypeValue)
Constructs a property with the given name
|
Modifier and Type | Method and Description |
---|---|
Map<T1,Object> |
asExplodedMap()
Returns a copy of the content as a new map but if the value is a PropertyBusinessObject it will
be converted to a Map
|
Map<T1,T2> |
asMap()
Returns a copy of the content as a new map
|
void |
clear()
Remove all the elements from the map
|
boolean |
equals(Object obj)
Compares this property to another property
|
T2 |
get(T1 key)
Gets the property value
|
Class |
getKeyType()
Returns the class for the key element if it's defined or null if it isn't
|
Class |
getValueType()
Returns the class for the value element if it's defined or null if it isn't
|
int |
hashCode()
Returns the internal hashcode or 0 for null property
|
Iterator<Map.Entry<T1,T2>> |
iterator()
Iterate over the elements of the property
|
Set<T1> |
keySet()
Returns the set of keys in the map property
|
K |
put(T1 key,
T2 v)
Same as
set(java.lang.Object, java.lang.Object) here for coding convention convenience
with map code |
K |
remove(T1 key)
Removes the item matching the given key
|
K |
set(T1 key,
T2 v)
Sets the property value and potentially fires a change event
|
K |
setMap(Map<T1,T2> t)
Sets the entire content of the property
|
int |
size()
The size of the property list
|
Collection<T2> |
valueSet()
Returns the set of values in the map property
|
addChangeListener, bindGlobalGetListener, bindGlobalSetListener, firePropertyChanged, getClientProperty, getGenericType, getLabel, getName, putClientProperty, removeChangeListener, setLabel, stopListening, toString, validateCollectionType
public MapProperty(String name)
name
- the name of the propertypublic Class getKeyType()
public Class getValueType()
public T2 get(T1 key)
key
- the map keypublic int size()
public K set(T1 key, T2 v)
key
- the key to setv
- the new valuepublic K put(T1 key, T2 v)
set(java.lang.Object, java.lang.Object)
here for coding convention convenience
with map codekey
- the key to setv
- the new valuepublic boolean equals(Object obj)
public int hashCode()
public Collection<T2> valueSet()
public Map<T1,Object> asExplodedMap()
public K setMap(Map<T1,T2> t)
t
- the map of elements to setpublic void clear()