/*******************************************************************************
* Copyright (c) 2006-2012
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
******************************************************************************/
package org.reuseware.coconut.compositionprogram.diagram.navigator;
import java.util.Collection;
import java.util.LinkedList;
/**
* @generated
*/
public class CompositionprogramNavigatorGroup extends
CompositionprogramAbstractNavigatorItem {
/**
* @generated
*/
private String myGroupName;
/**
* @generated
*/
private String myIcon;
/**
* @generated
*/
private Collection myChildren = new LinkedList();
/**
* @generated
*/
CompositionprogramNavigatorGroup(String groupName, String icon,
Object parent) {
super(parent);
myGroupName = groupName;
myIcon = icon;
}
/**
* @generated
*/
public String getGroupName() {
return myGroupName;
}
/**
* @generated
*/
public String getIcon() {
return myIcon;
}
/**
* @generated
*/
public Object[] getChildren() {
return myChildren.toArray();
}
/**
* @generated
*/
public void addChildren(Collection children) {
myChildren.addAll(children);
}
/**
* @generated
*/
public void addChild(Object child) {
myChildren.add(child);
}
/**
* @generated
*/
public boolean isEmpty() {
return myChildren.size() == 0;
}
/**
* @generated
*/
public boolean equals(Object obj) {
if (obj instanceof org.reuseware.coconut.compositionprogram.diagram.navigator.CompositionprogramNavigatorGroup) {
org.reuseware.coconut.compositionprogram.diagram.navigator.CompositionprogramNavigatorGroup anotherGroup = (org.reuseware.coconut.compositionprogram.diagram.navigator.CompositionprogramNavigatorGroup) obj;
if (getGroupName().equals(anotherGroup.getGroupName())) {
return getParent().equals(anotherGroup.getParent());
}
}
return super.equals(obj);
}
/**
* @generated
*/
public int hashCode() {
return getGroupName().hashCode();
}
}