|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.data.util.PropertysetItem
public class PropertysetItem
Class for handling a set of identified Properties. The elements contained in a MapItem can be referenced using locally unique identifiers. The class supports listeners who are interested in changes to the Property set managed by the class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Item |
|---|
Item.Editor, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer |
| Constructor Summary | |
|---|---|
PropertysetItem()
|
|
| Method Summary | |
|---|---|
boolean |
addItemProperty(Object id,
Property property)
Tries to add a new Property into the Item. |
void |
addListener(Item.PropertySetChangeListener listener)
Registers a new property set change listener for this Item. |
Object |
clone()
Creates and returns a copy of this object. |
boolean |
equals(Object obj)
Returns true if and only if the argument is not
null and is a Boolean object that represents the same
boolean value as this object. |
Property |
getItemProperty(Object id)
Gets the Property corresponding to the given Property ID stored in the Item. |
Collection |
getItemPropertyIds()
Gets the collection of IDs of all Properties stored in the Item. |
int |
hashCode()
Returns the hash code value for this list. |
boolean |
removeItemProperty(Object id)
Removes the Property identified by ID from the Item. |
void |
removeListener(Item.PropertySetChangeListener listener)
Removes a previously registered property set change listener. |
String |
toString()
Gets the String representation of the contents of the
Item. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertysetItem()
| Method Detail |
|---|
public Property getItemProperty(Object id)
null is
returned.
getItemProperty in interface Itemid - the identifier of the Property to get.
nullpublic Collection getItemPropertyIds()
getItemPropertyIds in interface Itempublic boolean removeItemProperty(Object id)
false.
removeItemProperty in interface Itemid - the ID of the Property to be removed.
true if the operation succeeded false
if not
public boolean addItemProperty(Object id,
Property property)
addItemProperty in interface Itemid - the ID of the new Property.property - the Property to be added and associated with the id.
true if the operation succeeded,
false if notpublic String toString()
String representation of the contents of the
Item. The format of the string is a space separated catenation of the
String representations of the Properties contained by the
Item.
toString in class ObjectString representation of the Item contentspublic void addListener(Item.PropertySetChangeListener listener)
addListener in interface Item.PropertySetChangeNotifierlistener - the new Listener to be registered.public void removeListener(Item.PropertySetChangeListener listener)
removeListener in interface Item.PropertySetChangeNotifierlistener - the Listener to be removed.
public Object clone()
throws CloneNotSupportedException
The method clone performs a shallow copy of the
PropertysetItem.
Note : All arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment, the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.
clone in class ObjectCloneNotSupportedException - if the object's class does not support the Cloneable
interface.Object.clone()public boolean equals(Object obj)
true if and only if the argument is not
null and is a Boolean object that represents the same
boolean value as this object.
equals in class Objectobj - the object to compare with.
true if the Boolean objects represent the same
value otherwise false.Object.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||