KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > rbtreesizesequence > DistanceEvent


1 /**
2 * Copyright (c) 2003 Daffodil Software Ltd., India all rights reserved.
3 * This library is free software; you can redistribute it and/or modify
4 * it under the terms of version 2.1 of the GNU Lesser General Public License as
5 * published by the Free Software Foundation.
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 Lesser General Public License for more details.
11 *
12 * You should have received a copy of the GNU Lesser General Public License
13 * along with this library; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */

16
17
18 package com.daffodilwoods.rbtreesizesequence;
19
20 /**
21  * Title:
22  * Description:
23  * Copyright: Copyright (c) 2001
24  * Company:
25  * @author
26  * @version 1.0
27  */

28
29 public class DistanceEvent {
30     public static final int DISTANCE_KNOWN = 0;
31     public static final int DISTANCE_UNKNOWN = 1;
32     public static final int DISTANCE_CHANGED = 2;
33
34     private int type;
35     private int distance;
36     private Object JavaDoc source;
37
38     public DistanceEvent(int type, int distance, Object JavaDoc source) {
39         this.type = type;
40         this.distance = distance;
41         this.source = source;
42     }
43
44     public Object JavaDoc getSource(){
45         return source;
46     }
47
48     public int getType(){
49         return type;
50     }
51     public int getDistance(){
52         return distance;
53     }
54 }
55
Popular Tags