source: src/main/java/weka/gui/streams/InstanceEvent.java @ 8

Last change on this file since 8 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 1.9 KB
RevLine 
[4]1/*
2 *    This program is free software; you can redistribute it and/or modify
3 *    it under the terms of the GNU General Public License as published by
4 *    the Free Software Foundation; either version 2 of the License, or
5 *    (at your option) any later version.
6 *
7 *    This program is distributed in the hope that it will be useful,
8 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
9 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10 *    GNU General Public License for more details.
11 *
12 *    You should have received a copy of the GNU General Public License
13 *    along with this program; if not, write to the Free Software
14 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17/*
18 *    InstanceEvent.java
19 *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
20 *
21 */
22
23package weka.gui.streams;
24
25import java.util.EventObject;
26
27/**
28 * An event encapsulating an instance stream event.
29 *
30 * @author Len Trigg (trigg@cs.waikato.ac.nz)
31 * @version $Revision: 1.7 $
32 */
33public class InstanceEvent
34  extends EventObject {
35
36  /** for serialization */
37  private static final long serialVersionUID = 3207259868110667379L;
38 
39  /** Specifies that the instance format is available */
40  public static final int FORMAT_AVAILABLE   = 1;
41
42  /** Specifies that an instance is available */
43  public static final int INSTANCE_AVAILABLE = 2;
44
45  /** Specifies that the batch of instances is finished */
46  public static final int BATCH_FINISHED     = 3;
47
48  private int m_ID;
49
50  /**
51   * Constructs an InstanceEvent with the specified source object and event
52   * type
53   *
54   * @param source the object generating the InstanceEvent
55   * @param ID the type of the InstanceEvent
56   */
57  public InstanceEvent(Object source, int ID) {
58
59    super(source);
60    m_ID = ID;
61  }
62
63  /**
64   * Get the event type
65   *
66   * @return the event type
67   */
68  public int getID() {
69
70    return m_ID;
71  }
72}
Note: See TracBrowser for help on using the repository browser.