InstanceEvent.java
Upload User: rhdiban
Upload Date: 2013-08-09
Package Size: 15085k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Java

  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.  *    InstanceEvent.java
  18.  *    Copyright (C) 1999 Len Trigg
  19.  *
  20.  */
  21. package weka.gui.streams;
  22. import java.util.EventObject;
  23. /** 
  24.  * An event encapsulating an instance stream event.
  25.  *
  26.  * @author Len Trigg (trigg@cs.waikato.ac.nz)
  27.  * @version $Revision: 1.3 $
  28.  */
  29. public class InstanceEvent extends EventObject {
  30.   
  31.   /** Specifies that the instance format is available */
  32.   public final static int FORMAT_AVAILABLE   = 1;
  33.   /** Specifies that an instance is available */
  34.   public final static int INSTANCE_AVAILABLE = 2;
  35.   /** Specifies that the batch of instances is finished */
  36.   public final static int BATCH_FINISHED     = 3;
  37.   private int m_ID;
  38.   /**
  39.    * Constructs an InstanceEvent with the specified source object and event 
  40.    * type
  41.    *
  42.    * @param source the object generating the InstanceEvent
  43.    * @param the type of the InstanceEvent
  44.    */
  45.   public InstanceEvent(Object source, int ID) {
  46.     super(source);
  47.     m_ID = ID;
  48.   }
  49.   /**
  50.    * Get the event type
  51.    *
  52.    * @return the event type
  53.    */
  54.   public int getID() {
  55.     return m_ID;
  56.   }
  57. }