View Javadoc

1   // **********************************************************************
2   //
3   // Generated by the ORBacus IDL to Java Translator
4   //
5   // Copyright (c) 2000
6   // Object Oriented Concepts, Inc.
7   // Billerica, MA, USA
8   //
9   // All Rights Reserved
10  //
11  // **********************************************************************
12  
13  // Version: 4.0.3
14  
15  package edu.iris.Fissures.model;
16  
17  import java.io.Serializable;
18  import edu.iris.Fissures.FlinnEngdahlRegion;
19  import edu.iris.Fissures.FlinnEngdahlType;
20  
21  //
22  // IDL:iris.edu/Fissures/FlinnEngdahlRegion:1.0
23  //
24  /****/
25  
26  public class FlinnEngdahlRegionImpl extends FlinnEngdahlRegion {
27  
28      public FlinnEngdahlRegionImpl(FlinnEngdahlType type,
29                                    int number) {
30          this.type = type;
31          this.number = number;
32      }
33  
34      protected  FlinnEngdahlRegionImpl() {}
35  
36      public static Serializable createEmpty() {
37          return new  FlinnEngdahlRegionImpl();
38      }
39  
40      public String toString() {
41          if (type.equals(FlinnEngdahlType.GEOGRAPHIC_REGION)) {
42              return "Geo FERegion "+number;
43          } else {
44              return "Seis FERegion "+number;
45          }
46      }
47  
48      public boolean equals(Object o){
49          if(o == this){ return true; }
50          else if(o instanceof FlinnEngdahlRegion){
51              FlinnEngdahlRegion oRegion = (FlinnEngdahlRegion)o;
52              if(oRegion.number == number &&
53                 type == oRegion.type){
54                  return true;
55              }
56          }
57          return false;
58      }
59  
60      public int hashCode(){
61          if(type == FlinnEngdahlType.GEOGRAPHIC_REGION){ return number; }
62          else{ return number * -1;}
63      }
64  }