Package adams.flow.container
Interface Container
-
- All Superinterfaces:
CloneHandler<Container>
,GlobalInfoSupporter
,Serializable
,SpreadSheetSupporter
- All Known Subinterfaces:
ContainerWithReport
- All Known Implementing Classes:
AbstractContainer
,AbstractFilterContainer
,ControlChartContainer
,EncapsulatedActorsContainer
,FeatureConverterContainer
,FileBasedDatasetContainer
,HttpRequestResult
,ImageSegmentationContainer
,OutlierContainer
,OutlierDetectorContainer
,PredictionEccentricityContainer
,ProcessActorContainer
,RemoteCommandContainer
,SequencePlotterContainer
,SpreadSheetCellSelectionContainer
,TimeseriesFilterContainer
,TimingContainer
,TrainTestSetContainer
,WekaAssociatorContainer
,WekaAttributeSelectionContainer
,WekaClusterEvaluationContainer
,WekaClusteringContainer
,WekaEvaluationContainer
,WekaExperimentContainer
,WekaFilterContainer
,WekaForecastContainer
,WekaForecastModelContainer
,WekaGeneticAlgorithmContainer
,WekaGeneticAlgorithmInitializationContainer
,WekaModelContainer
,WekaNearestNeighborSearchContainer
,WekaPredictionContainer
,WekaTrainTestSetContainer
public interface Container extends Serializable, CloneHandler<Container>, SpreadSheetSupporter, GlobalInfoSupporter
Interface for containers. A container allows the access to the stored values via their names.
NB: containers need to declare a default constructor. The default constructor is used to generate help information.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addAdditionalName(String name)
Adds the specified name as valid name for a value.void
addHelp(String name, String desc)
Stores the help for the given name if valid name.void
addHelp(String name, String desc, Class type)
Stores the help for the given name if valid name.void
addHelp(String name, String desc, Class[] types)
Stores the help for the given name if valid name.Container
getClone()
Returns a clone of itself using serialization.String
getHelp(String name)
Returns the help associated with the given name.Object
getValue(String name)
Returns the value associated with the given name.<T> T
getValue(String name, Class<T> cls)
Returns the value associated with the given name.boolean
hasHelp(String name)
Checks whether a given help is non-null.boolean
hasValue(String name)
Checks whether a given value is non-null.boolean
isValid()
Checks whether the setup of the container is valid.Iterator<String>
names()
Returns all value names that can be used (theoretically).boolean
removeAdditionalName(String name)
Removes the additional name again.boolean
setValue(String name, Object value)
Sets the named value.Iterator<String>
stored()
Returns all available stored value names.SpreadSheet
toSpreadSheet()
Returns the content as spreadsheet.String
toString()
Returns a short description of the stored data.-
Methods inherited from interface adams.core.GlobalInfoSupporter
globalInfo
-
-
-
-
Method Detail
-
getClone
Container getClone()
Returns a clone of itself using serialization.- Specified by:
getClone
in interfaceCloneHandler<Container>
- Returns:
- the clone
-
addHelp
void addHelp(String name, String desc)
Stores the help for the given name if valid name.- Parameters:
name
- the name to store the help underdesc
- the help description
-
addHelp
void addHelp(String name, String desc, Class type)
Stores the help for the given name if valid name.- Parameters:
name
- the name to store the help underdesc
- the help descriptiontype
- the type of the data
-
addHelp
void addHelp(String name, String desc, Class[] types)
Stores the help for the given name if valid name.- Parameters:
name
- the name to store the help underdesc
- the help descriptiontypes
- the types of the data
-
names
Iterator<String> names()
Returns all value names that can be used (theoretically).- Returns:
- iterator over all possible value names
-
stored
Iterator<String> stored()
Returns all available stored value names.- Returns:
- enumeration over all stored value names
-
hasValue
boolean hasValue(String name)
Checks whether a given value is non-null.- Parameters:
name
- the name of the value to check- Returns:
- true if the value is non-null
-
getValue
Object getValue(String name)
Returns the value associated with the given name.- Parameters:
name
- the name of the value- Returns:
- the associated value or null if not available
-
getValue
<T> T getValue(String name, Class<T> cls)
Returns the value associated with the given name.- Parameters:
name
- the name of the valuecls
- for casting- Returns:
- the associated value or null if not available
-
hasHelp
boolean hasHelp(String name)
Checks whether a given help is non-null.- Parameters:
name
- the name of the help item to check- Returns:
- true if the help is non-null
-
getHelp
String getHelp(String name)
Returns the help associated with the given name.- Parameters:
name
- the name of the help item- Returns:
- the associated help or null if not available
-
setValue
boolean setValue(String name, Object value)
Sets the named value.- Parameters:
name
- the name of the valuevalue
- the value to store in the container- Returns:
- true if the name was recognized and the value was stored successfully, false otherwise
-
isValid
boolean isValid()
Checks whether the setup of the container is valid.- Returns:
- true if all the necessary values are available
-
addAdditionalName
boolean addAdditionalName(String name)
Adds the specified name as valid name for a value.- Parameters:
name
- the name to add- Returns:
- true if the additional names list changed
-
removeAdditionalName
boolean removeAdditionalName(String name)
Removes the additional name again.- Parameters:
name
- the name to remove- Returns:
- true if the name was present and got removed
-
toString
String toString()
Returns a short description of the stored data.
-
toSpreadSheet
SpreadSheet toSpreadSheet()
Returns the content as spreadsheet.- Specified by:
toSpreadSheet
in interfaceSpreadSheetSupporter
- Returns:
- the content
-
-