public class InstanceEvent
extends java.util.EventObject
EventObject
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
BATCH_FINISHED |
static int |
FORMAT_AVAILABLE |
static int |
INSTANCE_AVAILABLE |
Constructor and Description |
---|
InstanceEvent(java.lang.Object source) |
InstanceEvent(java.lang.Object source,
Instance instance,
int status)
Creates a new
InstanceEvent instance that encapsulates
a single instance only. |
InstanceEvent(java.lang.Object source,
Instances structure)
Creates a new
InstanceEvent instance which encapsulates
header information only. |
Modifier and Type | Method and Description |
---|---|
Instance |
getInstance()
Get the instance
|
int |
getStatus()
Get the status
|
Instances |
getStructure()
Get the instances structure (may be null if this is not
a FORMAT_AVAILABLE event)
|
void |
setInstance(Instance i)
Set the instance
|
void |
setStatus(int s)
Set the status
|
void |
setStructure(Instances structure)
Set the instances structure
|
public static final int FORMAT_AVAILABLE
public static final int INSTANCE_AVAILABLE
public static final int BATCH_FINISHED
public InstanceEvent(java.lang.Object source, Instance instance, int status)
InstanceEvent
instance that encapsulates
a single instance only.source
- the source of the eventinstance
- the instancestatus
- status code (either INSTANCE_AVAILABLE or BATCH_FINISHED)public InstanceEvent(java.lang.Object source, Instances structure)
InstanceEvent
instance which encapsulates
header information only.source
- an Object
valuestructure
- an Instances
valuepublic InstanceEvent(java.lang.Object source)
public Instance getInstance()
Instance
valuepublic void setInstance(Instance i)
i
- an Instance
valuepublic int getStatus()
int
valuepublic void setStatus(int s)
s
- an int
valuepublic void setStructure(Instances structure)
structure
- an Instances
valuepublic Instances getStructure()
Instances
value