Class MapProperty<T,J,K>
java.lang.Object
com.codename1.properties.PropertyBase<Map.Entry<T,J>, K>
com.codename1.properties.MapProperty<T,J,K>
public class MapProperty<T,J,K>
extends PropertyBase<Map.Entry<T,J>, K>
implements Iterable<Map.Entry<T,J>>
Base class for a property as a Map which can contain multiple elements within it
-
Constructor Summary
ConstructorsConstructorDescriptionMapProperty(String name) Constructs a property with the given nameMapProperty(String name, Class genericTypeKey, Class genericTypeValue) Constructs a property with the given name -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of the content as a new map but if the value is a PropertyBusinessObject it will be converted to a MapasMap()Returns a copy of the content as a new mapvoidclear()Remove all the elements from the mapbooleanCompares this property to another propertyGets the property valueReturns the class for the key element if it's defined or null if it isn'tReturns the class for the value element if it's defined or null if it isn'tinthashCode()Returns the internal hashcode or 0 for null propertyiterator()Iterate over the elements of the propertykeySet()Returns the set of keys in the map propertySame asjava.lang.Object)here for coding convention convenience with map codeRemoves the item matching the given keySets the property value and potentially fires a change eventSets the entire content of the propertyintsize()The size of the property listvalueSet()Returns the set of values in the map propertyMethods inherited from class PropertyBase
addChangeListener, bindGlobalGetListener, bindGlobalSetListener, firePropertyChanged, getClientProperty, getGenericType, getLabel, getName, putClientProperty, removeChangeListener, setLabel, stopListening, toString, validateCollectionTypeMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
MapProperty
Constructs a property with the given name
Parameters
name: the name of the property
-
MapProperty
-
-
Method Details
-
getKeyType
Returns the class for the key element if it's defined or null if it isn't
Returns
the class matching the map key
-
getValueType
Returns the class for the value element if it's defined or null if it isn't
Returns
the class matching the map value
-
get
-
size
public int size()The size of the property list
Returns
the number of elements
-
set
-
put
-
remove
-
equals
-
hashCode
-
iterator
-
keySet
-
valueSet
Returns the set of values in the map property
Returns
the values
-
asMap
-
asExplodedMap
-
setMap
-
clear
public void clear()Remove all the elements from the map
-