org.deegree.cs
Class EPSGCode

java.lang.Object
  extended by org.deegree.cs.CRSCodeType
      extended by org.deegree.cs.EPSGCode

public class EPSGCode
extends CRSCodeType

The EPSGCode class formalizes the CRSIdentifiables object codes that were issued by EPSG. An instance of this class will represent all the EPSG codes variants that denote the same object.

Version:
$Revision: $, $Date: $
Author:
Andrei Ionita, last edited by: $Author: ionita $

Constructor Summary
EPSGCode(int codeNo)
          Construct an EPSGCode, i.e. a CRSCodeType with code space equals "EPSG".
 
Method Summary
 boolean equals(Object other)
           
 int getCodeNo()
          Returns the code number associated with this EPSG code
 int hashCode()
          Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast.
 
Methods inherited from class org.deegree.cs.CRSCodeType
getCode, getCodeSpace, getCodeVersion, getOriginal, getUndefined, toString, valueOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EPSGCode

public EPSGCode(int codeNo)
Construct an EPSGCode, i.e. a CRSCodeType with code space equals "EPSG". Note: Use this constructor when you know the code created is not a condensed form, but it actually exists, i.e. you mean "EPSG:4326" not "URN:OGC:DEF:CRS:EPSG:4326". It will matter when comparing them or the CRSIdentifiers that bear them.

Parameters:
codeNo -
Method Detail

getCodeNo

public int getCodeNo()
Returns the code number associated with this EPSG code

Returns:
the code number

equals

public boolean equals(Object other)
Overrides:
equals in class CRSCodeType

hashCode

public int hashCode()
Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even distribution and is relatively fast. It is created from field f as follows:

Combining the hash code(s) computed above: result = 37 * result + code;

Overrides:
hashCode in class CRSCodeType
Returns:
(int) ( result >>> 32 ) ^ (int) result;
See Also:
Object.hashCode()


Copyright © 2011. All Rights Reserved.