From 7c22ec62d41df8981925a16d845186737a72212d Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 4 Oct 2010 12:50:31 +0000 Subject: #5692 Generics: PropertySetItem (class needs cleanup) svn changeset:15362/svn branch:6.5 --- src/com/vaadin/data/util/PropertysetItem.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/com') diff --git a/src/com/vaadin/data/util/PropertysetItem.java b/src/com/vaadin/data/util/PropertysetItem.java index 1f1398983c..ace85892d4 100644 --- a/src/com/vaadin/data/util/PropertysetItem.java +++ b/src/com/vaadin/data/util/PropertysetItem.java @@ -34,17 +34,17 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, /** * Mapping from property id to property. */ - private HashMap map = new HashMap(); + private HashMap map = new HashMap(); /** * List of all property ids to maintain the order. */ - private LinkedList list = new LinkedList(); + private LinkedList list = new LinkedList(); /** * List of property set modification listeners. */ - private LinkedList propertySetChangeListeners = null; + private LinkedList propertySetChangeListeners = null; /* Item methods */ @@ -58,7 +58,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, * @return the Property with the given ID or null */ public Property getItemProperty(Object id) { - return (Property) map.get(id); + return map.get(id); } /** @@ -67,7 +67,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, * @return unmodifiable collection containing IDs of the Properties stored * the Item */ - public Collection getItemPropertyIds() { + public Collection getItemPropertyIds() { return Collections.unmodifiableCollection(list); } @@ -141,7 +141,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, public String toString() { String retValue = ""; - for (final Iterator i = getItemPropertyIds().iterator(); i.hasNext();) { + for (final Iterator i = getItemPropertyIds().iterator(); i.hasNext();) { final Object propertyId = i.next(); retValue += getItemProperty(propertyId).toString(); if (i.hasNext()) { @@ -188,7 +188,7 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, */ public void addListener(Item.PropertySetChangeListener listener) { if (propertySetChangeListeners == null) { - propertySetChangeListeners = new LinkedList(); + propertySetChangeListeners = new LinkedList(); } propertySetChangeListeners.add(listener); } @@ -246,10 +246,10 @@ public class PropertysetItem implements Item, Item.PropertySetChangeNotifier, final PropertysetItem npsi = new PropertysetItem(); - npsi.list = list != null ? (LinkedList) list.clone() : null; - npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList) propertySetChangeListeners + npsi.list = list != null ? (LinkedList) list.clone() : null; + npsi.propertySetChangeListeners = propertySetChangeListeners != null ? (LinkedList) propertySetChangeListeners .clone() : null; - npsi.map = (HashMap) map.clone(); + npsi.map = (HashMap) map.clone(); return npsi; } -- cgit v1.2.3