Class SgroupManipulator
- java.lang.Object
-
- org.openscience.cdk.tools.manipulator.SgroupManipulator
-
public final class SgroupManipulator extends Object
Utilities related to Ctab Sgroups.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Sgroup>
copy(Collection<Sgroup> sgroups, Map<? extends IChemObject,? extends IChemObject> replace)
-
-
-
Method Detail
-
copy
public static List<Sgroup> copy(Collection<Sgroup> sgroups, Map<? extends IChemObject,? extends IChemObject> replace)
Copy a collection of Sgroups, replacing anyIAtom
/IBond
references with those present in the provided 'replace' map. If an empty replace map is provided (null or empty) the sgroups are simply duplicated. If an item is not present in the replacement map the original item is preserved.
Map<IChemObject,IChemObject> replace = new HashMap<>(); replace.put(orgAtom, newAtom); replace.put(orgBond, newBond); newSgroups = copy(orgSgroups, replace);
- Parameters:
sgroups
- collection of sgroups, can be nullreplace
- the replacement map, can be null- Returns:
- list of copied sgroups, null if sgroups input was null
-
-