KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class DistanceAdapter implements DistanceListener{
22
23     private Object JavaDoc locationId1,locationId2;
24     private int distanceStatus = Integer.MIN_VALUE;
25
26     public DistanceAdapter(Object JavaDoc locationId1,Object JavaDoc locationId2){
27           this.locationId1 = locationId1;
28           this.locationId2 = locationId2;
29     }
30     public void distanceNotify(DistanceEvent event){
31     }
32
33
34     public Object JavaDoc getLocationId1(){
35         return locationId1;
36     }
37
38     public Object JavaDoc getLocationId2(){
39         return locationId2;
40     }
41
42     void setDistanceStatus(int distanceStatus){
43             this.distanceStatus = distanceStatus;
44     }
45
46     public int getDistanceStatus(){
47         return distanceStatus;
48     }
49
50     public String JavaDoc toString(){
51         return "LocationId1 :: "+getLocationId1()+" LocationId2 :: "+getLocationId2()+" DistanceStatus :: "+getDistanceStatus();
52     }
53
54 }
55
Popular Tags