/
StereoEncoderFactory.java
58 lines (52 loc) · 2.01 KB
/
StereoEncoderFactory.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
* Copyright (c) 2013 John May <jwmay@users.sf.net>
*
* Contact: cdk-devel@lists.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
* All we ask is that proper credit is given for our work, which includes
* - but is not limited to - adding the above copyright notice to the beginning
* of your source code files, and to any copyright notice that you may distribute
* with programs based on this work.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 U
*/
package org.openscience.cdk.hash.stereo;
import org.openscience.cdk.interfaces.IAtomContainer;
/**
* Describes a factory for stereo elements. The factory create encoders for
* specific stereo elements.
*
* @author John May
* @cdk.module hash
* @cdk.githash
*/
public interface StereoEncoderFactory {
/**
* Empty factory for when stereo encoding is not required
*/
public static StereoEncoderFactory EMPTY = new StereoEncoderFactory() {
@Override
public StereoEncoder create(IAtomContainer container, int[][] graph) {
return StereoEncoder.EMPTY;
}
};
/**
* Create a stereo-encoder for possible stereo-chemical configurations.
*
* @param container the container
* @param graph adjacency list representation of the container
* @return a new stereo encoder
*/
public StereoEncoder create(IAtomContainer container, int[][] graph);
}