cds.astro
Class SpTypeCode

java.lang.Object
  extended by cds.astro.SpTypeCode

public class SpTypeCode
extends java.lang.Object

Container for a spectral code name item (temp class or lum class) and its code value


Constructor Summary
SpTypeCode(java.lang.String sname, int scode)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object o2)
          Equals method
 int getCode()
          Get the code
 java.lang.String getName()
          Get the name
 int hashCode()
          Compute the hashcode
 void setCode(int scode)
          Set the code value
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpTypeCode

public SpTypeCode(java.lang.String sname,
                  int scode)
Constructor

Parameters:
sname - name of the spectral type item
scode - code value of the item
Method Detail

equals

public boolean equals(java.lang.Object o2)
Equals method

Overrides:
equals in class java.lang.Object
Parameters:
o2 - 2nd SpTypeCode object to compare with the current object
Returns:
true if the two SpTypeCode objects contain the same name and code

hashCode

public int hashCode()
Compute the hashcode

Overrides:
hashCode in class java.lang.Object
Returns:
the hascode value

getName

public final java.lang.String getName()
Get the name

Returns:
the spectral code name of the item

getCode

public final int getCode()
Get the code

Returns:
the spectral code value of the item

setCode

public final void setCode(int scode)
Set the code value

Parameters:
scode - code value