All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class crw.solid.PeriodicTable

java.lang.Object
   |
   +----crw.solid.PeriodicTable

public class PeriodicTable
extends Object
Class maintains a list of atomic symbols of the periodic table. Used to test if a String is a symbol found in the Periodic Table.

Version:
1.0 1997/7/3
Author:
C. R. Wie

Constructor Index

 o PeriodicTable()

Method Index

 o containsAtom(String)
Test if it contains the Atomic info of the argument.
 o get(String)
Returns the Atom object corresponding to the atomic symbol.
 o getAtomicNo(String)
Returns the Atomic Number of the symbol provided as argument.
 o getSymbol(int)
Returns the Atomic Symbol corresponding to the Atomic Number provided as argument.
 o isAtomSymbol(String)
Tests if a String is a symbol found in the Periodic Table.

Constructors

 o PeriodicTable
 public PeriodicTable()

Methods

 o isAtomSymbol
 public static boolean isAtomSymbol(String symbol)
Tests if a String is a symbol found in the Periodic Table.

Parameters:
symbol - the atomic symbol
Returns:
true if the argument is an Atomic symbol.
 o containsAtom
 public static boolean containsAtom(String symbol)
Test if it contains the Atomic info of the argument.

Parameters:
symbol - the Atom
Returns:
true if the Atom object is available.
 o getAtomicNo
 public static int getAtomicNo(String s)
Returns the Atomic Number of the symbol provided as argument.

Parameters:
s - the Atomic Symbol.
Returns:
the Atomic Number or zero if the argument is not an atomic symbol.
 o getSymbol
 public static String getSymbol(int i) throws NotAnAtomicNumberException
Returns the Atomic Symbol corresponding to the Atomic Number provided as argument. If the argument is less than 1 or bigger than 106 then it throws an Exception.

Parameters:
i - the Atomic Number
Returns:
the Atomic Symbol
Throws: NotAnAtomicNumberException
if the atomic number is not in the range from 1 through 106.
 o get
 public static Atom get(String symbol)
Returns the Atom object corresponding to the atomic symbol.

Parameters:
symbol - the Atomic symbol
Returns:
the Atom object

All Packages  Class Hierarchy  This Package  Previous  Next  Index