|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcage.ValencyElementRule
public class ValencyElementRule
An implementation of ElementRule
that deduces the element of
atom based on the degree of the corresponding vertex.
Constructor Summary | |
---|---|
ValencyElementRule(java.lang.String elementRule)
Create a new ValencyElementRule object based on
elementRule. |
Method Summary | |
---|---|
java.lang.String |
getElement(EmbeddableGraph graph,
int vertex)
Returns the chemical symbol of the chemical element of the atom corresponding with vertex in graph by looking up the element for the degree of vertex. |
static void |
main(java.lang.String[] argv)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValencyElementRule(java.lang.String elementRule)
ValencyElementRule
object based on
elementRule. This string is a set of rules seperated by
whitespaces. Each rule is formatted as follows: [degree:]element.
The degree is optional in this format. If no degree is given, then the
element corresponds with the first free degree starting from the last
degree for which a rule was added. Only one element per degree is
possible and in case more than one element is given for the same degree,
only the last one will be remembered.
elementRule
- A string containing the rules for this object.Method Detail |
---|
public java.lang.String getElement(EmbeddableGraph graph, int vertex)
getElement
in interface ElementRule
graph
- The graph that contains the vertexvertex
- The vertex for which the element is requested
public static void main(java.lang.String[] argv)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |