|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.extensions.AbstractUjo
org.ujoframework.implementation.mapImpl.MapImplUjo
public abstract class MapImplUjo
The abstract String Map Ujo imlementation is an implementation of
the UjoMiddle
and Map<CharSequence,Object> interfaces.
A child implementation can use "public static final UjoProperty" constants for its UjoProperties.
The map key can be any CharSequence object include a direct UjoProperty from its implementation.
Notes:
import org.ujoframework.implementation.map.*; public class Person extends MapImplUjo { public static final UjoProperty<Person,String > NAME = newProperty("name" , String.class); public static final UjoProperty<Person,Boolean> MALE = newProperty("male" , Boolean.class); public static final UjoProperty<Person,Date > BIRTH = newProperty("birth", Date.class); }
Property| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,java.lang.Object> |
data
Object data |
| Constructor Summary | |
|---|---|
|
MapImplUjo()
Constructor |
protected |
MapImplUjo(java.util.HashMap<java.lang.String,java.lang.Object> aData)
Constructor |
| Method Summary | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
void |
clear()
Removes all of the mappings from this map. |
||||||||||||||||||||||||
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a mapping for the specified key. |
||||||||||||||||||||||||
boolean |
containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value. |
||||||||||||||||||||||||
java.util.Set<java.util.Map.Entry<java.lang.CharSequence,java.lang.Object>> |
entrySet()
Returns a Set view of the mappings contained in this map. |
||||||||||||||||||||||||
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped, the null
is not supported |
||||||||||||||||||||||||
boolean |
isEmpty()
Returns the number of key-value mappings in this map. |
||||||||||||||||||||||||
java.util.Set<java.lang.CharSequence> |
keySet()
Returns a set of String keys. |
||||||||||||||||||||||||
protected static
|
newListProperty(java.lang.String name,
java.lang.Class<ITEM> type)
A ListProperty Factory Method assigns a next property index. |
||||||||||||||||||||||||
static
|
newProperty(java.lang.String name,
java.lang.Class<VALUE> type)
Returns a new instance of property where the default value is null. |
||||||||||||||||||||||||
protected static
|
newProperty(java.lang.String name,
VALUE value)
A Property Factory Method assigns a next property index. |
||||||||||||||||||||||||
java.lang.Object |
put(java.lang.CharSequence key,
java.lang.Object value)
Associates the specified value with the specified key in this map. |
||||||||||||||||||||||||
void |
putAll(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Object> m)
|
||||||||||||||||||||||||
java.lang.Object |
readValue(UjoProperty property)
It is a common method for reading all object values, however there is strongly recomended to use a method |
java.lang.Object |
remove(java.lang.Object key)
Removes the mapping for the specified key from this map if present. |
||||||||||||||||||||||
int |
size()
Returns the number of key-value mappings in this map |
||||||||||||||||||||||||
java.util.Collection<java.lang.Object> |
values()
Returns a Collection view of the values contained in this map |
||||||||||||||||||||||||
void |
writeValue(UjoProperty property,
java.lang.Object value)
It is a common method for writing all object values, however there is strongly recomended to use a method
dataprotected final java.util.HashMap<java.lang.String,java.lang.Object> data
MapImplUjopublic MapImplUjo()
MapImplUjoprotected MapImplUjo(java.util.HashMap<java.lang.String,java.lang.Object> aData)
writeValuepublic void writeValue(UjoProperty property, java.lang.Object value)
readValuepublic java.lang.Object readValue(UjoProperty property)
sizepublic int size()
isEmptypublic boolean isEmpty()
containsKeypublic boolean containsKey(java.lang.Object key)
containsValuepublic boolean containsValue(java.lang.Object value)
getpublic java.lang.Object get(java.lang.Object key)
put
public java.lang.Object put(java.lang.CharSequence key,
java.lang.Object value)
removepublic java.lang.Object remove(java.lang.Object key)
putAllpublic void putAll(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Object> m)
clearpublic void clear()
keySetpublic java.util.Set<java.lang.CharSequence> keySet()
valuespublic java.util.Collection<java.lang.Object> values()
entrySetpublic java.util.Set<java.util.Map.Entry<java.lang.CharSequence,java.lang.Object>> entrySet()
newPropertypublic static <UJO extends MapImplUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name, java.lang.Class<VALUE> type)
newPropertyprotected static <UJO extends MapImplUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name, VALUE value)
newListPropertyprotected static <UJO extends MapImplUjo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name, java.lang.Class<ITEM> type)
Copyright © 2009. All Rights Reserved. | ||||||||||||||||||||||||