JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.chemistry
Class Element

java.lang.Object
  extended bygov.nasa.javaGenes.chemistry.Element
All Implemented Interfaces:
java.io.Serializable

public class Element
extends java.lang.Object
implements java.io.Serializable

represents elements in the periodic table. Normally only one object per element will ever be needed.

See Also:
Serialized Form

Constructor Summary
Element()
           
Element(int atomicNumber)
           
 
Method Summary
 boolean equals(Element element)
           
 int getAtomicNumber()
           
 double getAtomicWeight()
           
 Element getElement(int atomicNumber)
           
static Element getElement(java.lang.String symbolOrName)
           
 int getGroup()
           
 int getPeriod()
           
 java.lang.String getSymbol()
           
 int getValence()
           
 int hashCode()
           
static void initPeriodicTable()
           
 void setAtomicNumber(int atomicNumber)
          perform alchemy, transmute this element.
static void test(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Element

public Element()

Element

public Element(int atomicNumber)
Method Detail

getElement

public Element getElement(int atomicNumber)

getElement

public static Element getElement(java.lang.String symbolOrName)

getAtomicNumber

public int getAtomicNumber()

getValence

public int getValence()

getSymbol

public java.lang.String getSymbol()

getAtomicWeight

public double getAtomicWeight()

getPeriod

public int getPeriod()

getGroup

public int getGroup()

toString

public java.lang.String toString()

equals

public boolean equals(Element element)

hashCode

public int hashCode()

setAtomicNumber

public void setAtomicNumber(int atomicNumber)
perform alchemy, transmute this element. Not recommended.


initPeriodicTable

public static void initPeriodicTable()

test

public static void test(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException

JavaGenes, NASA Ames. Written largely by Al Globus