File tree Expand file tree Collapse file tree 4 files changed +7
-10
lines changed
isomorphism/src/main/java/org/openscience/cdk/isomorphism
standard/src/main/java/org/openscience/cdk/aromaticity
legacy/src/main/java/org/openscience/cdk/smiles/smarts Expand file tree Collapse file tree 4 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 24
24
25
25
package org .openscience .cdk .isomorphism ;
26
26
27
- import com .google .common .collect .Sets ;
28
-
29
27
import java .util .BitSet ;
28
+ import java .util .HashSet ;
30
29
import java .util .Set ;
31
30
import java .util .function .Predicate ;
32
31
@@ -56,7 +55,7 @@ final class UniqueAtomMatches implements Predicate<int[]> {
56
55
* @param expectedHits expected number of unique matches
57
56
*/
58
57
private UniqueAtomMatches (int expectedHits ) {
59
- this .unique = Sets . newHashSetWithExpectedSize ( expectedHits );
58
+ this .unique = new HashSet <>( 2 * expectedHits );
60
59
}
61
60
62
61
/**
Original file line number Diff line number Diff line change 24
24
25
25
package org .openscience .cdk .isomorphism ;
26
26
27
- import com .google .common .collect .Sets ;
28
-
29
27
import java .util .HashSet ;
30
28
import java .util .Set ;
31
29
import java .util .function .Predicate ;
@@ -59,7 +57,7 @@ final class UniqueBondMatches implements Predicate<int[]> {
59
57
* @param expectedHits expected number of unique matches
60
58
*/
61
59
private UniqueBondMatches (int [][] g , int expectedHits ) {
62
- this .unique = Sets . newHashSetWithExpectedSize ( expectedHits );
60
+ this .unique = new HashSet <>( 2 * expectedHits );
63
61
this .g = g ;
64
62
}
65
63
Original file line number Diff line number Diff line change 24
24
25
25
package org .openscience .cdk .aromaticity ;
26
26
27
- import com .google .common .collect .Sets ;
28
27
import org .openscience .cdk .exception .CDKException ;
29
28
import org .openscience .cdk .graph .CycleFinder ;
30
29
import org .openscience .cdk .graph .Cycles ;
35
34
import org .openscience .cdk .ringsearch .RingSearch ;
36
35
37
36
import java .util .Arrays ;
37
+ import java .util .HashSet ;
38
38
import java .util .Objects ;
39
39
import java .util .Set ;
40
40
@@ -186,7 +186,7 @@ public Set<IBond> findBonds(IAtomContainer molecule) throws CDKException {
186
186
final RingSearch ringSearch = new RingSearch (molecule , graph );
187
187
final int [] electrons = model .contribution (molecule , ringSearch );
188
188
189
- final Set <IBond > bonds = Sets . newHashSetWithExpectedSize ( molecule .getBondCount ());
189
+ final Set <IBond > bonds = new HashSet <>( 2 * molecule .getBondCount ());
190
190
191
191
// obtain the subset of electron contributions which are >= 0 (i.e.
192
192
// allowed to be aromatic) - we then find the cycles in this subgraph
Original file line number Diff line number Diff line change 19
19
package org .openscience .cdk .smiles .smarts ;
20
20
21
21
import com .google .common .collect .FluentIterable ;
22
- import com .google .common .collect .Sets ;
23
22
import com .google .common .primitives .Ints ;
24
23
import org .openscience .cdk .aromaticity .Aromaticity ;
25
24
import org .openscience .cdk .aromaticity .ElectronDonation ;
43
42
44
43
import java .util .ArrayList ;
45
44
import java .util .BitSet ;
45
+ import java .util .HashSet ;
46
46
import java .util .LinkedHashMap ;
47
47
import java .util .List ;
48
48
import java .util .Map ;
@@ -406,7 +406,7 @@ public List<List<Integer>> getMatchingAtoms() {
406
406
*/
407
407
public List <List <Integer >> getUniqueMatchingAtoms () {
408
408
List <List <Integer >> matched = new ArrayList <List <Integer >>(mappings .size ());
409
- Set <BitSet > atomSets = Sets . newHashSetWithExpectedSize ( mappings .size ());
409
+ Set <BitSet > atomSets = new HashSet <>( 2 * mappings .size ());
410
410
for (int [] mapping : mappings ) {
411
411
BitSet atomSet = new BitSet ();
412
412
for (int x : mapping )
You can’t perform that action at this time.
0 commit comments