RescueObject.java 740 Bytes
Newer Older
Juon Kawakami's avatar
init  
Juon Kawakami committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package firesimulator.world;

import org.apache.log4j.Logger;

/**
 * @author tn
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public abstract class RescueObject implements WorldConstants {
    int id;
	
    public RescueObject(int id){
        this.id=id;
    }
	
    public boolean isStationary(){
        return false;
    }
		
    public int hashCode(){
        return id;
    }
	
    public boolean equals( Object o ) {
        if (!(o instanceof RescueObject)) {
            return false;
        }
        return this.id == ((RescueObject)o).id;
    }
		
    public abstract String getType();
		
    public int getID(){
        return id;
    }
}