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
-
PeriodicTable()
-
-
containsAtom(String)
- Test if it contains the Atomic info of the argument.
-
get(String)
- Returns the Atom object corresponding to the atomic symbol.
-
getAtomicNo(String)
- Returns the Atomic Number of the symbol provided as argument.
-
getSymbol(int)
- Returns the Atomic Symbol corresponding to the Atomic Number provided as
argument.
-
isAtomSymbol(String)
- Tests if a String is a symbol found in the Periodic Table.
PeriodicTable
public PeriodicTable()
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.
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.
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.
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.
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