public class Element extends Object
ElementProvider. Each element is
basically final. The isotopes and ions can easily be created with the provided methods.| Constructor and Description |
|---|
Element(String name,
String symbol,
int protonNumber,
double atomicWeight,
String electronConfiguration) |
Element(String name,
String symbol,
int protonNumber,
double atomicWeight,
String electronConfiguration,
double vanDerWaalsRadius)
Creates a new Element with name, symbol, proton number and atomic weight in
g/mol. |
Element(String name,
String symbol,
int protonNumber,
javax.measure.Quantity<MolarMass> atomicWeight,
String electronConfiguration)
Creates a new Element with name, symbol, proton number and atomic weight.
|
| Modifier and Type | Method and Description |
|---|---|
Element |
asAnion(int numberOfElectronsGained)
Converts this element into an ion (anion) by increasing its electron count.
|
Element |
asCation(int numberOfElectronsLost)
Converts this element into an ion (cation) by decreasing its electron count.
|
Element |
asIon(int charge)
Converts this element into an ion (cation) by decreasing its electron count.
|
Element |
asIsotope(int massNumber)
Converts this element into an isotope by adjusting its neutron count.
|
boolean |
equals(Object o) |
javax.measure.Quantity<MolarMass> |
getAtomicMass()
Returns the atomic mass.
|
int |
getCharge()
Returns the charge of this Element.
|
int |
getElectronNumber()
Returns the electron number.
|
int |
getMassNumber() |
String |
getName()
Returns the name.
|
int |
getNeutronNumber()
Returns the neutron number.
|
int |
getNumberOfPotentialBonds()
Estimates the Number of potential bonds this element forms.
|
int |
getProtonNumber()
Returns the proton number.
|
String |
getSymbol()
Returns the symbol.
|
int |
getValenceElectronNumber()
Returns the number of valence electrons.
|
javax.measure.Quantity<javax.measure.quantity.Length> |
getVanDerWaalsRadius() |
int |
hashCode() |
boolean |
isAnion()
Returns
true if this Element is an anion (excess of electrons) and false otherwise. |
boolean |
isCation()
Returns
true if this Element is an cation (shortage of electrons) and false otherwise. |
boolean |
isIon()
Returns
true if this Element is an ion and false otherwise. |
boolean |
isIsotope()
Returns
true if this Element is an isotope and false otherwise. |
void |
setAtomicMass(javax.measure.Quantity<MolarMass> atomicMass)
Sets the atomic mass.
|
String |
toString() |
public Element(String name, String symbol, int protonNumber, javax.measure.Quantity<MolarMass> atomicWeight, String electronConfiguration)
name - The name.symbol - The symbol.protonNumber - The proton number.atomicWeight - The atomic weight.electronConfiguration - The electron configuration.public Element(String name, String symbol, int protonNumber, double atomicWeight, String electronConfiguration, double vanDerWaalsRadius)
g/mol.name - The name.symbol - The symbol.protonNumber - The proton number.atomicWeight - The atomic weight.electronConfiguration - The electron configuration.vanDerWaalsRadius - The van der Waals radius.public String getName()
public String getSymbol()
public int getProtonNumber()
public javax.measure.Quantity<MolarMass> getAtomicMass()
public void setAtomicMass(javax.measure.Quantity<MolarMass> atomicMass)
atomicMass - The atomic mass.public int getElectronNumber()
public int getValenceElectronNumber()
public int getNumberOfPotentialBonds()
public int getNeutronNumber()
public Element asIon(int charge)
charge - The total charge of this elementpublic Element asCation(int numberOfElectronsLost)
numberOfElectronsLost - The number of electrons to decrease.public Element asAnion(int numberOfElectronsGained)
numberOfElectronsGained - The number of electrons gained.public Element asIsotope(int massNumber)
massNumber - The mass number (number of protons + neutrons).public boolean isIon()
true if this Element is an ion and false otherwise.true if this Element is an ion and false otherwise.public boolean isAnion()
true if this Element is an anion (excess of electrons) and false otherwise.true if this Element is an anion and false otherwise.public boolean isCation()
true if this Element is an cation (shortage of electrons) and false otherwise.true if this Element is an cation and false otherwise.public int getCharge()
public int getMassNumber()
public javax.measure.Quantity<javax.measure.quantity.Length> getVanDerWaalsRadius()
public boolean isIsotope()
true if this Element is an isotope and false otherwise.true if this Element is an isotope and false otherwise.Copyright © 2018. All rights reserved.