|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisidia.misc.property.PropertyTable
public class PropertyTable
A property table stores properties under names like a Hashtable. The difference with the hashtable is given by default values which are not stored to save space.
Constructor Summary | |
---|---|
PropertyTable()
Using this constructor, there will be no default values. |
|
PropertyTable(java.util.Hashtable<java.lang.Object,VisidiaProperty> defaults)
Constructs a new property table with default values. |
|
PropertyTable(java.util.Hashtable<java.lang.Object,VisidiaProperty> def,
java.util.Hashtable<java.lang.Object,VisidiaProperty> properties)
Constructs a new property table with default and specifics values. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
containsElement(java.lang.Object key)
Contains element. |
java.util.Set<java.util.Map.Entry<java.lang.Object,VisidiaProperty>> |
entrySet()
Returns a Set view of mappings contained in this property table. |
java.lang.Object |
getLockOwner()
Gets the lock owner. |
java.util.Set<java.lang.Object> |
getPropertyKeys()
Gets the property keys. |
VisidiaProperty |
getVisidiaProperty(java.lang.Object key)
Returns the property associated with the key. |
boolean |
isPersistentProperty(java.lang.Object key)
Checks if the property associated with the key is persistent (it cannot be removed). |
boolean |
locked()
Locked. |
void |
lockProperties(java.lang.Object requester)
Lock properties. |
VisidiaProperty |
removeProperty(java.lang.Object key)
Removes the property. |
void |
resetProperties()
Reset properties. |
void |
setProperties(PropertyTable properties)
Sets the properties. |
VisidiaProperty |
setVisidiaProperty(VisidiaProperty property)
Sets a property: a value and the corresponding key. |
void |
unlockProperties(java.lang.Object requester)
Unlock properties only if lockOwner has locked the properties itself. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyTable()
public PropertyTable(java.util.Hashtable<java.lang.Object,VisidiaProperty> defaults)
defaults
- Default properties that will be used when nobody has modified them.public PropertyTable(java.util.Hashtable<java.lang.Object,VisidiaProperty> def, java.util.Hashtable<java.lang.Object,VisidiaProperty> properties)
def
- Default properties that will be used when nobody has modified them.properties
- Specifics properties that will be used for this property table.Method Detail |
---|
public void setProperties(PropertyTable properties)
properties
- the new propertiespublic java.lang.Object clone()
clone
in class java.lang.Object
public java.util.Set<java.util.Map.Entry<java.lang.Object,VisidiaProperty>> entrySet()
public VisidiaProperty getVisidiaProperty(java.lang.Object key)
key
- the key
public VisidiaProperty setVisidiaProperty(VisidiaProperty property)
property
- the property
null
if it did not have one.public boolean isPersistentProperty(java.lang.Object key)
key
- the key
public VisidiaProperty removeProperty(java.lang.Object key)
key
- the key
public void resetProperties()
public java.util.Set<java.lang.Object> getPropertyKeys()
public boolean containsElement(java.lang.Object key)
key
- the key
public java.lang.Object getLockOwner()
public boolean locked()
public void lockProperties(java.lang.Object requester)
requester
- the requesterpublic void unlockProperties(java.lang.Object requester)
requester
- the requester
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |