Class AbstractNestableResultItem
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.output.AbstractResultItem
-
- adams.gui.tools.wekainvestigator.output.AbstractNestableResultItem
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
ResultItem
,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
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_NameSuffix
the name suffix to use (optional).protected Map<String,AbstractNestableResultItem>
m_NestedItems
nested result items.-
Fields inherited from class adams.gui.tools.wekainvestigator.output.AbstractResultItem
m_Header, m_Log, m_LogPanel, m_Name, m_TabbedPane, m_Timestamp, MAX_RELATIONNAME_LENGTH
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNestableResultItem(weka.core.Instances header)
Initializes the item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNestedItem(String name, AbstractNestableResultItem item)
Adds the nested item.void
cleanUp()
Cleans up data structures, frees up memory.String
getNameSuffix()
Returns the name suffix of the item.AbstractNestableResultItem
getNestedItem(String name)
Returns the nested items by its name.boolean
hasNestedItems()
Returns whether nested items are present.List<String>
nestedItemNames()
Returns the names of the nested items.void
setNameSuffix(String value)
Sets the optional name suffix.-
Methods inherited from class adams.gui.tools.wekainvestigator.output.AbstractResultItem
createName, getHeader, getLogPanel, getName, getTabbedPane, hasHeader, invalidateName, logError, logMessage, toString
-
-
-
-
Field Detail
-
m_NameSuffix
protected String m_NameSuffix
the name suffix to use (optional).
-
m_NestedItems
protected Map<String,AbstractNestableResultItem> m_NestedItems
nested result items.
-
-
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 nameitem
- 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 interfaceadams.core.CleanUpHandler
- Overrides:
cleanUp
in classAbstractResultItem
-
-