001    /*
002     * Copyright (c) 1998-2014 ChemAxon Ltd. All Rights Reserved.
003     *
004     * This software is the confidential and proprietary information of
005     * ChemAxon. You shall not disclose such Confidential Information
006     * and shall use it only in accordance with the terms of the agreements
007     * you entered into with ChemAxon.
008     *
009     */
010    package com.chemaxon.overlap;
011    
012    /**
013     * Similarity result implementation.
014     *
015     * @author Gabor Imre
016     */
017    public final class SimilarityResultImpl implements SimilarityResultNode {
018    
019        /**
020         * Represented target ID.
021         */
022        private final int targetId;
023    
024        /**
025         * Represented dissimilarity.
026         */
027        private final double dissimilarity;
028    
029        /**
030         * Construct.
031         *
032         * @param targetId      Target ID
033         * @param dissimilarity Dissimilarity to represent
034         */
035        public SimilarityResultImpl(int targetId, double dissimilarity) {
036            this.targetId = targetId;
037            this.dissimilarity = dissimilarity;
038        }
039    
040        @Override
041        public int getTargetID() {
042            return this.targetId;
043        }
044    
045        @Override
046        public double getDissimiliarity() {
047            return this.dissimilarity;
048        }
049    
050        @Override
051        public String toString() {
052            return "Target ID: " + this.targetId + " Dissimilarity: " + this.dissimilarity;
053        }
054    
055    
056    }