// Checks that the new visible columns contains no nulls and properties
// exist
- final Collection properties = getContainerPropertyIds();
+ final Collection<?> properties = getContainerPropertyIds();
for (int i = 0; i < visibleColumns.length; i++) {
if (visibleColumns[i] == null) {
throw new NullPointerException("Ids must be non-nulls");
// columnGenerators 'override' properties, don't add the same id twice
Collection<Object> col = new LinkedList<Object>();
- for (Iterator it = getContainerPropertyIds().iterator(); it.hasNext();) {
+ for (Iterator<?> it = getContainerPropertyIds().iterator(); it
+ .hasNext();) {
Object id = it.next();
if (columnGenerators == null || !columnGenerators.containsKey(id)) {
col.add(id);
// selection support
LinkedList<String> selectedKeys = new LinkedList<String>();
if (isMultiSelect()) {
- HashSet sel = new HashSet((Set) getValue());
- Collection vids = getVisibleItemIds();
- for (Iterator it = vids.iterator(); it.hasNext();) {
+ HashSet<?> sel = new HashSet<Object>((Set<?>) getValue());
+ Collection<?> vids = getVisibleItemIds();
+ for (Iterator<?> it = vids.iterator(); it.hasNext();) {
Object id = it.next();
if (sel.contains(id)) {
selectedKeys.add(itemIdMapper.key(id));
target.addAttribute("colfooters", columnFootersVisible);
// Visible column order
- final Collection sortables = getSortableContainerPropertyIds();
+ final Collection<?> sortables = getSortableContainerPropertyIds();
final ArrayList<String> visibleColOrder = new ArrayList<String>();
for (final Iterator<Object> it = visibleColumns.iterator(); it
.hasNext();) {
if (columnGenerators.containsKey(columnId)) {
iscomponent[iscomponentIndex++] = true;
} else {
- final Class colType = getType(columnId);
+ final Class<?> colType = getType(columnId);
iscomponent[iscomponentIndex++] = colType != null
&& Component.class.isAssignableFrom(colType);
}
* @see com.vaadin.ui.Select#getVisibleItemIds()
*/
@Override
- public Collection getVisibleItemIds() {
+ public Collection<?> getVisibleItemIds() {
final LinkedList<Object> visible = new LinkedList<Object>();
*
* @see com.vaadin.data.Container.Sortable#getSortableContainerPropertyIds()
*/
- public Collection getSortableContainerPropertyIds() {
+ public Collection<?> getSortableContainerPropertyIds() {
final Container c = getContainerDataSource();
if (c instanceof Container.Sortable && !isSortDisabled()) {
return ((Container.Sortable) c).getSortableContainerPropertyIds();
} else {
- return new LinkedList();
+ return new LinkedList<Object>();
}
}
boolean result = true;
// Initial stack
- final Stack todo = new Stack();
+ final Stack<Object> todo = new Stack<Object>();
todo.add(startItemId);
// Expands recursively
boolean result = true;
// Initial stack
- final Stack todo = new Stack();
+ final Stack<Object> todo = new Stack<Object>();
todo.add(startItemId);
// Collapse recursively
* java.util.Map)
*/
@Override
- public void changeVariables(Object source, Map variables) {
+ public void changeVariables(Object source, Map<String, Object> variables) {
if (variables.containsKey("clickedKey")) {
String key = (String) variables.get("clickedKey");
if (!isSelectable() && variables.containsKey("selected")) {
// Not-selectable is a special case, AbstractSelect does not support
// TODO could be optimized.
- variables = new HashMap(variables);
+ variables = new HashMap<String, Object>(variables);
variables.remove("selected");
}
final String[] ka = (String[]) variables.get("selected");
// Converts the key-array to id-set
- final LinkedList s = new LinkedList();
+ final LinkedList<Object> s = new LinkedList<Object>();
for (int i = 0; i < ka.length; i++) {
final Object id = itemIdMapper.get(ka[i]);
if (!isNullSelectionAllowed()
final LinkedList<String> expandedKeys = new LinkedList<String>();
// Iterates through hierarchical tree using a stack of iterators
- final Stack<Iterator> iteratorStack = new Stack<Iterator>();
- Collection ids;
+ final Stack<Iterator<?>> iteratorStack = new Stack<Iterator<?>>();
+ Collection<?> ids;
if (partialUpdate) {
ids = getChildren(expandedItemId);
} else {
while (!iteratorStack.isEmpty()) {
// Gets the iterator for current tree level
- final Iterator i = iteratorStack.peek();
+ final Iterator<?> i = iteratorStack.peek();
// If the level is finished, back to previous tree level
if (!i.hasNext()) {
*
* @see com.vaadin.data.Container.Hierarchical#getChildren(Object)
*/
- public Collection getChildren(Object itemId) {
+ public Collection<?> getChildren(Object itemId) {
return ((Container.Hierarchical) items).getChildren(itemId);
}
*
* @see com.vaadin.data.Container.Hierarchical#rootItemIds()
*/
- public Collection rootItemIds() {
+ public Collection<?> rootItemIds() {
return ((Container.Hierarchical) items).rootItemIds();
}
* @see com.vaadin.ui.Select#getVisibleItemIds()
*/
@Override
- public Collection getVisibleItemIds() {
+ public Collection<?> getVisibleItemIds() {
- final LinkedList visible = new LinkedList();
+ final LinkedList<Object> visible = new LinkedList<Object>();
// Iterates trough hierarchical tree using a stack of iterators
- final Stack<Iterator> iteratorStack = new Stack<Iterator>();
- final Collection ids = rootItemIds();
+ final Stack<Iterator<?>> iteratorStack = new Stack<Iterator<?>>();
+ final Collection<?> ids = rootItemIds();
if (ids != null) {
iteratorStack.push(ids.iterator());
}
while (!iteratorStack.isEmpty()) {
// Gets the iterator for current tree level
- final Iterator i = iteratorStack.peek();
+ final Iterator<?> i = iteratorStack.peek();
// If the level is finished, back to previous tree level
if (!i.hasNext()) {
VerticalDropLocation dropLocation = getDropLocation();
if (VerticalDropLocation.TOP == dropLocation) {
// if on top of the caption area, add before
- Collection children;
+ Collection<?> children;
Object itemIdInto = getItemIdInto();
if (itemIdInto != null) {
// seek the previous from child list