Class TreeElement<C extends org.eclipse.emf.ecore.EObject>

java.lang.Object
com.amalgamasimulation.desktop.appelements.tree.TreeElement<C>
Type Parameters:
C - container type

public class TreeElement<C extends org.eclipse.emf.ecore.EObject> extends Object
Element of the tree: the root, a group or a leaf. The role comes from the tree part:
  • the root is the element that AbstractTreePart.createRootTreeElement returns;
  • a group is an element for which AbstractTreePart.getChildren returns children;
  • a leaf is an element for which getChildren returns an empty list.
new TreeElement<>(type, container) creates an element without an object, new TreeElement<>(type, container, object) an element linked to an object. The root, a group and a leaf can each be created either way.
  • Constructor Details

  • Method Details

    • getTreeElementType

      public AbstractTreeElementType getTreeElementType()
    • getContainer

      public C getContainer()
    • getObject

      public Object getObject()
      Returns the model object shown by the element, or null for a group.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object