Class AbstractNestableResultItem

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, Serializable
    Direct Known Subclasses:
    ResultItem

    public abstract class AbstractNestableResultItem
    extends AbstractResultItem
    Container for a data to be stored in result history that can also store nested result items.
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractNestableResultItem

        protected AbstractNestableResultItem​(weka.core.Instances header)
        Initializes the item.
        Parameters:
        header - the header of the training set, can be null
    • Method Detail

      • setNameSuffix

        public void setNameSuffix​(String value)
        Sets the optional name suffix.
        Parameters:
        value - the suffix, null if not to use any
      • getNameSuffix

        public String getNameSuffix()
        Returns the name suffix of the item.
        Returns:
        the name suffix, null if none specified
      • addNestedItem

        public void addNestedItem​(String name,
                                  AbstractNestableResultItem item)
        Adds the nested item.
        Parameters:
        name - the name
        item - the item
      • hasNestedItems

        public boolean hasNestedItems()
        Returns whether nested items are present.
        Returns:
        true if present
      • nestedItemNames

        public List<String> nestedItemNames()
        Returns the names of the nested items.
        Returns:
        the names
      • getNestedItem

        public AbstractNestableResultItem getNestedItem​(String name)
        Returns the nested items by its name.
        Parameters:
        name - the name of the item to retrieve
        Returns:
        the item, null if not found
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface adams.core.CleanUpHandler
        Overrides:
        cleanUp in class AbstractResultItem