|
||||||||||
| 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,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| 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 Property.getValue(org.ujoframework.Ujo)
to an external access for a better type safe. |
|
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 Property.setValue(org.ujoframework.Ujo, java.lang.Object)
to an external access for a better type safe. |
|
| Methods inherited from class org.ujoframework.extensions.AbstractUjo |
|---|
clone, equals, init, init, readAuthorization, readProperties, readUjoManager, readValueString, toString, writeValueString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public MapImplUjo()
protected MapImplUjo(java.util.HashMap<java.lang.String,java.lang.Object> aData)
| Method Detail |
|---|
public void writeValue(UjoProperty property,
java.lang.Object value)
Property.setValue(org.ujoframework.Ujo, java.lang.Object)
to an external access for a better type safe.
The method have got a strategy place for an implementation of several listeners and validators.
writeValue in interface Ujoproperty - Property must be a direct type only!Property.setValue(Ujo,Object)public java.lang.Object readValue(UjoProperty property)
Property.getValue(org.ujoframework.Ujo)
to an external access for a better type safe.
The method have got a strategy place for an implementation of several listeners and convertors.
readValue in interface Ujoproperty - Property must be a direct type only!
Property.getValue(org.ujoframework.Ujo)public int size()
size in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public boolean isEmpty()
isEmpty in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Map<java.lang.CharSequence,java.lang.Object>key - Any CharSequence include a direct UjoPropertypublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public java.lang.Object get(java.lang.Object key)
null
is not supported
get in interface java.util.Map<java.lang.CharSequence,java.lang.Object>key - Any CharSequence include a direct UjoProperty
public java.lang.Object put(java.lang.CharSequence key,
java.lang.Object value)
put in interface java.util.Map<java.lang.CharSequence,java.lang.Object>key - Any CharSequence include a direct UjoPropertyvalue -
public java.lang.Object remove(java.lang.Object key)
remove in interface java.util.Map<java.lang.CharSequence,java.lang.Object>key - Any CharSequence include a direct UjoProperty
public void putAll(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.Object> m)
putAll in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public void clear()
clear in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public java.util.Set<java.lang.CharSequence> keySet()
keySet in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public java.util.Collection<java.lang.Object> values()
Collection view of the values contained in this map
values in interface java.util.Map<java.lang.CharSequence,java.lang.Object>public java.util.Set<java.util.Map.Entry<java.lang.CharSequence,java.lang.Object>> entrySet()
Set view of the mappings contained in this map.
entrySet in interface java.util.Map<java.lang.CharSequence,java.lang.Object>
public static <UJO extends MapImplUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name,
java.lang.Class<VALUE> type)
protected static <UJO extends MapImplUjo,VALUE> Property<UJO,VALUE> newProperty(java.lang.String name,
VALUE value)
protected static <UJO extends MapImplUjo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name,
java.lang.Class<ITEM> type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||