Package weka.gui.beans
Class InstanceEvent
- java.lang.Object
-
- java.util.EventObject
-
- weka.gui.beans.InstanceEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class InstanceEvent extends java.util.EventObjectEvent that encapsulates a single instance or header information only- Version:
- $Revision: 1.5 $
- Author:
- Mark Hall
- See Also:
EventObject, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intBATCH_FINISHEDstatic intFORMAT_AVAILABLEstatic intINSTANCE_AVAILABLE
-
Constructor Summary
Constructors Constructor Description InstanceEvent(java.lang.Object source)InstanceEvent(java.lang.Object source, Instance instance, int status)Creates a newInstanceEventinstance that encapsulates a single instance only.InstanceEvent(java.lang.Object source, Instances structure)Creates a newInstanceEventinstance which encapsulates header information only.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstancegetInstance()Get the instanceintgetStatus()Get the statusInstancesgetStructure()Get the instances structure (may be null if this is not a FORMAT_AVAILABLE event)voidsetInstance(Instance i)Set the instancevoidsetStatus(int s)Set the statusvoidsetStructure(Instances structure)Set the instances structure
-
-
-
Field Detail
-
FORMAT_AVAILABLE
public static final int FORMAT_AVAILABLE
- See Also:
- Constant Field Values
-
INSTANCE_AVAILABLE
public static final int INSTANCE_AVAILABLE
- See Also:
- Constant Field Values
-
BATCH_FINISHED
public static final int BATCH_FINISHED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InstanceEvent
public InstanceEvent(java.lang.Object source, Instance instance, int status)Creates a newInstanceEventinstance that encapsulates a single instance only.- Parameters:
source- the source of the eventinstance- the instancestatus- status code (either INSTANCE_AVAILABLE or BATCH_FINISHED)
-
InstanceEvent
public InstanceEvent(java.lang.Object source, Instances structure)Creates a newInstanceEventinstance which encapsulates header information only.- Parameters:
source- anObjectvaluestructure- anInstancesvalue
-
InstanceEvent
public InstanceEvent(java.lang.Object source)
-
-
Method Detail
-
getInstance
public Instance getInstance()
Get the instance- Returns:
- an
Instancevalue
-
setInstance
public void setInstance(Instance i)
Set the instance- Parameters:
i- anInstancevalue
-
getStatus
public int getStatus()
Get the status- Returns:
- an
intvalue
-
setStatus
public void setStatus(int s)
Set the status- Parameters:
s- anintvalue
-
setStructure
public void setStructure(Instances structure)
Set the instances structure- Parameters:
structure- anInstancesvalue
-
getStructure
public Instances getStructure()
Get the instances structure (may be null if this is not a FORMAT_AVAILABLE event)- Returns:
- an
Instancesvalue
-
-