Class GenericTreeElement<T>

  • All Implemented Interfaces:
    java.io.Serializable

    public class GenericTreeElement<T>
    extends java.lang.Object
    implements java.io.Serializable
    The class GenericTreeElement represents as the name already presume a tree element
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_CONTENT_KEY  
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericTreeElement()  
      GenericTreeElement​(java.util.Map<java.lang.String,​java.lang.Object> properties, java.lang.String name, boolean leaf, boolean withText, java.lang.String iconPath, java.lang.String selectedIconPath)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> GenericTreeElement.GenericTreeElementBuilder<T> builder()  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object o)  
      T getDefaultContent()
      Gets the default content object from the map
      java.lang.String getIconPath()
      The icon path for a custom tree icon, if not set default icon will be set
      java.lang.String getName()
      The name of this tree element.
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      The map with optional properties
      java.lang.String getSelectedIconPath()
      The selected icon path for a custom selected tree icon, if not set default icon will be set
      int hashCode()  
      boolean isLeaf()
      The flag that indicates if this tree element is a node.
      boolean isWithText()
      The flag that indicates if a text label should shown if an icon exists
      GenericTreeElement<T> setDefaultContent​(T defaultContent)
      Sets the default content object from the map to the given object
      void setIconPath​(java.lang.String iconPath)
      The icon path for a custom tree icon, if not set default icon will be set
      void setLeaf​(boolean leaf)
      The flag that indicates if this tree element is a node.
      void setName​(java.lang.String name)
      The name of this tree element.
      void setSelectedIconPath​(java.lang.String selectedIconPath)
      The selected icon path for a custom selected tree icon, if not set default icon will be set
      void setWithText​(boolean withText)
      The flag that indicates if a text label should shown if an icon exists
      GenericTreeElement.GenericTreeElementBuilder<T> toBuilder()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULT_CONTENT_KEY

        public static final java.lang.String DEFAULT_CONTENT_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • GenericTreeElement

        public GenericTreeElement()
      • GenericTreeElement

        public GenericTreeElement​(java.util.Map<java.lang.String,​java.lang.Object> properties,
                                  java.lang.String name,
                                  boolean leaf,
                                  boolean withText,
                                  java.lang.String iconPath,
                                  java.lang.String selectedIconPath)
    • Method Detail

      • getDefaultContent

        public T getDefaultContent()
        Gets the default content object from the map
        Returns:
        the default content object from the map
      • setDefaultContent

        public GenericTreeElement<T> setDefaultContent​(T defaultContent)
        Sets the default content object from the map to the given object
        Parameters:
        defaultContent - the default content object to set
        Returns:
        this object
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        The map with optional properties
      • getName

        public java.lang.String getName()
        The name of this tree element.
      • isLeaf

        public boolean isLeaf()
        The flag that indicates if this tree element is a node.
      • isWithText

        public boolean isWithText()
        The flag that indicates if a text label should shown if an icon exists
      • getIconPath

        public java.lang.String getIconPath()
        The icon path for a custom tree icon, if not set default icon will be set
      • getSelectedIconPath

        public java.lang.String getSelectedIconPath()
        The selected icon path for a custom selected tree icon, if not set default icon will be set
      • setName

        public void setName​(java.lang.String name)
        The name of this tree element.
      • setLeaf

        public void setLeaf​(boolean leaf)
        The flag that indicates if this tree element is a node.
      • setWithText

        public void setWithText​(boolean withText)
        The flag that indicates if a text label should shown if an icon exists
      • setIconPath

        public void setIconPath​(java.lang.String iconPath)
        The icon path for a custom tree icon, if not set default icon will be set
      • setSelectedIconPath

        public void setSelectedIconPath​(java.lang.String selectedIconPath)
        The selected icon path for a custom selected tree icon, if not set default icon will be set
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object