Package weka.gui.beans

# Class InstanceEvent

java.lang.Object
java.util.EventObject
weka.gui.beans.InstanceEvent

All Implemented Interfaces:
  `Serializable`

public class InstanceEvent extends EventObject
Event that encapsulates a single instance or header information only

Version:
  $Revision: 9205 $
Author:
  Mark Hall
See Also:
  - `EventObject`
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `BATCH_FINISHED`
  `static final int`
  `FORMAT_AVAILABLE`
  `static final int`
  `INSTANCE_AVAILABLE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InstanceEvent(Object source)`
  `InstanceEvent(Object source, Instance instance, int status)`
  Creates a new `InstanceEvent` instance that encapsulates a single instance only.
  `InstanceEvent(Object source, Instances structure)`
  Creates a new `InstanceEvent` instance which encapsulates header information only.

- ## Method Summary

  Modifier and Type
  Method
  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

  ### Methods inherited from class java.util.EventObject

  `getSource, toString`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### 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 Details

  - ### InstanceEvent

    public InstanceEvent(Object source, Instance instance, int status)
    Creates a new `InstanceEvent` instance that encapsulates a single instance only.
    Parameters:
      `source` - the source of the event
      `instance` - the instance
      `status` - status code (either INSTANCE_AVAILABLE or BATCH_FINISHED)

  - ### InstanceEvent

    public InstanceEvent(Object source, Instances structure)
    Creates a new `InstanceEvent` instance which encapsulates header information only.
    Parameters:
      `source` - an `Object` value
      `structure` - an `Instances` value

  - ### InstanceEvent

    public InstanceEvent(Object source)

- ## Method Details

  - ### getInstance

    public Instance getInstance()
    Get the instance
    Returns:
      an `Instance` value

  - ### setInstance

    public void setInstance(Instance i)
    Set the instance
    Parameters:
      `i` - an `Instance` value

  - ### getStatus

    public int getStatus()
    Get the status
    Returns:
      an `int` value

  - ### setStatus

    public void setStatus(int s)
    Set the status
    Parameters:
      `s` - an `int` value

  - ### setStructure

    public void setStructure(Instances structure)
    Set the instances structure
    Parameters:
      `structure` - an `Instances` value

  - ### getStructure

    public Instances getStructure()
    Get the instances structure (may be null if this is not a FORMAT_AVAILABLE event)
    Returns:
      an `Instances` value