Package weka.gui.beans
Class InstanceEvent
java.lang.Object
java.util.EventObject
weka.gui.beans.InstanceEvent
- All Implemented Interfaces:
Serializable
Event that encapsulates a single instance or header information only
- Version:
- $Revision: 9205 $
- Author:
- Mark Hall
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionInstanceEvent(Object source) InstanceEvent(Object source, Instance instance, int status) Creates a newInstanceEventinstance that encapsulates a single instance only.InstanceEvent(Object source, Instances structure) Creates a newInstanceEventinstance which encapsulates header information only. -
Method Summary
Modifier and TypeMethodDescriptionGet the instanceintGet the statusGet the instances structure (may be null if this is not a FORMAT_AVAILABLE event)voidSet the instancevoidsetStatus(int s) Set the statusvoidsetStructure(Instances structure) Set the instances structureMethods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
FORMAT_AVAILABLE
public static final int FORMAT_AVAILABLE- See Also:
-
INSTANCE_AVAILABLE
public static final int INSTANCE_AVAILABLE- See Also:
-
BATCH_FINISHED
public static final int BATCH_FINISHED- See Also:
-
-
Constructor Details
-
InstanceEvent
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
Creates a newInstanceEventinstance which encapsulates header information only.- Parameters:
source- anObjectvaluestructure- anInstancesvalue
-
InstanceEvent
-
-
Method Details
-
getInstance
Get the instance- Returns:
- an
Instancevalue
-
setInstance
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
Set the instances structure- Parameters:
structure- anInstancesvalue
-
getStructure
Get the instances structure (may be null if this is not a FORMAT_AVAILABLE event)- Returns:
- an
Instancesvalue
-