public class DebugElement extends Element implements IElement
atomicNumber
Ac, Ag, Al, Am, Ar, As, At, Au, B, Ba, Be, Bh, Bi, Bk, Br, C, Ca, Cd, Ce, Cf, Cl, Cm, Cn, Co, Cr, Cs, Cu, Db, Ds, Dy, Er, Es, Eu, F, Fe, Fl, Fm, Fr, Ga, Gd, Ge, H, He, Hf, Hg, Ho, Hs, I, In, Ir, K, Kr, La, Li, Lr, Lu, Lv, Mc, Md, Mg, Mn, Mo, Mt, N, Na, Nb, Nd, Ne, Nh, Ni, No, Np, O, Og, Os, P, Pa, Pb, Pd, Pm, Po, Pr, Pt, Pu, Ra, Rb, Re, Rf, Rg, Rh, Rn, Ru, S, Sb, Sc, Se, Sg, Si, Sm, Sn, Sr, Ta, Tb, Tc, Te, Th, Ti, Tl, Tm, Ts, U, V, W, Wildcard, Xe, Y, Yb, Zn, Zr
Constructor and Description |
---|
DebugElement() |
DebugElement(IElement element) |
DebugElement(String symbol) |
DebugElement(String symbol,
int atomicNumber) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(IChemObjectListener col)
Use this to add yourself to this IChemObject as a listener.
|
void |
addProperties(Map<Object,Object> properties)
Sets the properties of this object.
|
Object |
clone()
Clones this
IChemObject . |
Integer |
getAtomicNumber()
Returns the atomic number of this element.
|
IChemObjectBuilder |
getBuilder()
Returns a
IChemObjectBuilder for the data classes that extend
this class. |
boolean |
getFlag(int flagType)
Returns the value of a given flag.
|
boolean[] |
getFlags()
Returns the whole set of flags.
|
String |
getID()
Returns the identifier (ID) of this object.
|
int |
getListenerCount()
Returns the number of ChemObjectListeners registered with this object.
|
Map<Object,Object> |
getProperties()
Returns a Map with the IChemObject's properties.
|
<T> T |
getProperty(Object description)
Returns a property for the IChemObject.
|
String |
getSymbol()
Returns the element symbol of this element.
|
void |
notifyChanged()
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
notifyChanged(IChemObjectChangeEvent evt)
This should be triggered by an method that changes the content of an object
to that the registered listeners can react to it.
|
void |
removeListener(IChemObjectListener col)
Use this to remove a ChemObjectListener from the ListenerList of this
IChemObject.
|
void |
removeProperty(Object description)
Removes a property for a IChemObject.
|
void |
setAtomicNumber(Integer atomicNumber)
Sets the atomic number of this element.
|
void |
setFlag(int flagType,
boolean flagValue)
Sets the value of some flag.
|
void |
setFlags(boolean[] flagsNew)
Sets the whole set of flags.
|
void |
setID(String identifier)
Sets the identifier (ID) of this object.
|
void |
setProperty(Object description,
Object property)
Sets a property for a IChemObject.
|
void |
setSymbol(String symbol)
Sets the element symbol of this element.
|
getFlagValue, getNotification, getProperty, setNotification, setProperties, shallowCopy
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFlagValue, getNotification, getProperty, setNotification, setProperties, toString
public DebugElement()
public DebugElement(String symbol)
public DebugElement(String symbol, int atomicNumber)
public DebugElement(IElement element)
public Integer getAtomicNumber()
Once instantiated all field not filled by passing parameters to the constructor are null. Elements can be configured by using the IsotopeFactory.configure() method:
Element element = new Element("C"); IsotopeFactory if = IsotopeFactory.getInstance(element.getNewBuilder()); if.configure(element);
getAtomicNumber
in interface IElement
getAtomicNumber
in class Element
Element.setAtomicNumber(java.lang.Integer)
public void setAtomicNumber(Integer atomicNumber)
setAtomicNumber
in interface IElement
setAtomicNumber
in class Element
atomicNumber
- The atomic mass to be assigned to this elementElement.getAtomicNumber()
public String getSymbol()
getSymbol
in interface IElement
getSymbol
in class Element
Element.setSymbol(java.lang.String)
public void setSymbol(String symbol)
setSymbol
in interface IElement
setSymbol
in class Element
symbol
- The element symbol to be assigned to this atomElement.getSymbol()
public void addListener(IChemObjectListener col)
addListener
in interface IChemObject
addListener
in class ChemObject
col
- the ChemObjectListenerChemObject.removeListener(org.openscience.cdk.interfaces.IChemObjectListener)
public int getListenerCount()
getListenerCount
in interface IChemObject
getListenerCount
in class ChemObject
public void removeListener(IChemObjectListener col)
removeListener
in interface IChemObject
removeListener
in class ChemObject
col
- The ChemObjectListener to be removedChemObject.addListener(org.openscience.cdk.interfaces.IChemObjectListener)
public void notifyChanged()
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
public void notifyChanged(IChemObjectChangeEvent evt)
notifyChanged
in interface IChemObject
notifyChanged
in class ChemObject
evt
- A ChemObjectChangeEvent pointing to the source of where
the change happenedpublic void setProperty(Object description, Object property)
setProperty
in interface IChemObject
setProperty
in class ChemObject
description
- An object description of the property (most likely a
unique string)property
- An object with the property itselfChemObject.getProperty(java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public void removeProperty(Object description)
removeProperty
in interface IChemObject
removeProperty
in class ChemObject
description
- The object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.getProperty(java.lang.Object)
public <T> T getProperty(Object description)
getProperty
in interface IChemObject
getProperty
in class ChemObject
T
- generic return typedescription
- An object description of the property (most likely a
unique string)ChemObject.setProperty(java.lang.Object, java.lang.Object)
,
ChemObject.removeProperty(java.lang.Object)
public Map<Object,Object> getProperties()
getProperties
in interface IChemObject
getProperties
in class ChemObject
ChemObject.addProperties(java.util.Map<java.lang.Object, java.lang.Object>)
public String getID()
getID
in interface IChemObject
getID
in class ChemObject
ChemObject.setID(java.lang.String)
public void setID(String identifier)
setID
in interface IChemObject
setID
in class ChemObject
identifier
- a String representing the ID valueChemObject.getID()
public void setFlag(int flagType, boolean flagValue)
CDKConstants.ISAROMATIC
or CDKConstants.VISITED
). The flags are
intrinsic internal properties and should not be used to store custom
values, please use IChemObject.setProperty(Object, Object)
.
// set this chem object to be aromatic
chemObject.setFlag(CDKConstants.ISAROMATIC, Boolean.TRUE);
// ...
// indicate we have visited this chem object
chemObject.setFlag(CDKConstants.VISITED, Boolean.TRUE);
setFlag
in interface IChemObject
setFlag
in class ChemObject
flagType
- flag to set the value forflagValue
- value to assign to flagIChemObject.getFlag(int)
,
CDKConstants
public boolean getFlag(int flagType)
CDKConstants.ISAROMATIC
).
if(chemObject.getFlag(CDKConstants.ISAROMATIC)){
// handle aromatic flag on this chem object
}
getFlag
in interface IChemObject
getFlag
in class ChemObject
flagType
- flag to retrieve the value offlag_type
is setIChemObject.setFlag(int, boolean)
,
CDKConstants
public void addProperties(Map<Object,Object> properties)
addProperties
in interface IChemObject
addProperties
in class ChemObject
properties
- a Hashtable specifying the property valuesChemObject.getProperties()
public void setFlags(boolean[] flagsNew)
setFlags
in interface IChemObject
setFlags
in class ChemObject
flagsNew
- the new flags.ChemObject.getFlags()
public boolean[] getFlags()
getFlags
in interface IChemObject
getFlags
in class ChemObject
ChemObject.setFlags(boolean[])
public Object clone() throws CloneNotSupportedException
IChemObject
. It clones the identifier, flags,
properties and pointer vectors. The ChemObjectListeners are not cloned, and
neither is the content of the pointer vectors.clone
in interface IChemObject
clone
in class Element
CloneNotSupportedException
- if the IChemObject cannot be clonedpublic IChemObjectBuilder getBuilder()
IChemObjectBuilder
for the data classes that extend
this class.getBuilder
in interface ICDKObject
getBuilder
in class ChemObject
IChemObjectBuilder
matching this ICDKObject
Copyright © 2021. All rights reserved.