Skip to content

Commit a626138

Browse files
committed
Fix Expr documentation.
1 parent c939223 commit a626138

File tree

1 file changed

+19
-19
lines changed
  • base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers

1 file changed

+19
-19
lines changed

base/isomorphism/src/main/java/org/openscience/cdk/isomorphism/matchers/Expr.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* A expression stores a predicate tree for checking properties of atoms
4848
* and bonds.
4949
* <pre>
50-
* Expr expr = new Expr(ExprType.ELEMENT, 6);
50+
* Expr expr = new Expr(ELEMENT, 6);
5151
* if (expr.matches(atom)) {
5252
* // expression matches if atom is a carbon!
5353
* }
@@ -57,13 +57,13 @@
5757
* an intermediate (logical) node. The simplest expression trees contain a
5858
* single leaf node:
5959
* <pre>
60-
* new Expr(ExprType.IS_AROMATIC; // matches any aromatic atom
61-
* new Expr(ExprType.ELEMENT, 6); // matches any carbon atom (atomic num=6)
62-
* new Expr(ExprType.VALENCE, 4); // matches an atom with valence 4
63-
* new Expr(ExprType.DEGREE, 1); // matches a terminal atom, e.g. -OH, =O
64-
* new Expr(ExprType.IS_IN_RING); // matches any atom marked as in a ring
65-
* new Expr(ExprType.IS_HETERO); // matches anything other than carbon or nitrogen
66-
* new Expr(ExprType.TRUE); // any atom
60+
* new Expr(IS_AROMATIC); // matches any aromatic atom
61+
* new Expr(ELEMENT, 6); // matches any carbon atom (atomic num=6)
62+
* new Expr(VALENCE, 4); // matches an atom with valence 4
63+
* new Expr(DEGREE, 1); // matches a terminal atom, e.g. -OH, =O
64+
* new Expr(IS_IN_RING); // matches any atom marked as in a ring
65+
* new Expr(IS_HETERO); // matches anything other than carbon or nitrogen
66+
* new Expr(TRUE); // any atom
6767
* </pre>
6868
* Logical internal nodes combine one or two sub-expressions with conjunction
6969
* (and), disjunction (or), and negation (not).
@@ -79,24 +79,24 @@
7979
* </pre>
8080
* We can construct this tree as follows:
8181
* <pre>
82-
* Expr expr = new Expr(ExprType.ELEMENT, 35) // Br
83-
* .or(new Expr(ExprType.ELEMENT, 17)) // Cl
84-
* .or(new Expr(ExprType.ELEMENT, 9)) // F</pre>
82+
* Expr expr = new Expr(ELEMENT, 9) // F
83+
* .or(new Expr(ELEMENT, 17)) // Cl
84+
* .or(new Expr(ELEMENT, 35)) // Br</pre>
8585
* A more verbose construction could also be used:
8686
* <pre>
87-
* Expr leafF = new Expr(ExprType.ELEMENT, 9); // F
88-
* Expr leafCl = new Expr(ExprType.ELEMENT, 17); // Cl
89-
* Expr leafBr = new Expr(ExprType.ELEMENT, 35); // Br
90-
* Expr node4 = new Expr(ExprType.OR, leaf2, leaf3);
91-
* Expr node5 = new Expr(ExprType.OR, leaf1, node4);
87+
* Expr leafF = new Expr(ELEMENT, 9); // F
88+
* Expr leafCl = new Expr(ELEMENT, 17); // Cl
89+
* Expr leafBr = new Expr(ELEMENT, 35); // Br
90+
* Expr node4 = new Expr(OR, leaf2, leaf3);
91+
* Expr node5 = new Expr(OR, leaf1, node4);
9292
* </pre>
9393
*
9494
* Expressions can be used to match bonds. Note some expressions apply to either
9595
* atoms or bonds.
9696
* <pre>
97-
* new Expr(ExprType.TRUE); // any bond
98-
* new Expr(ExprType.IS_IN_RING); // any ring bond
99-
* new Expr(ExprType.ALIPHATIC_ORDER, 2); // double bond
97+
* new Expr(TRUE); // any bond
98+
* new Expr(IS_IN_RING); // any ring bond
99+
* new Expr(ALIPHATIC_ORDER, 2); // double bond
100100
* </pre>
101101
* See the documentation for {@link Type}s for a detail explanation of
102102
* each type.

0 commit comments

Comments
 (0)