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.io;
011    
012    import com.google.common.base.Optional;
013    
014    /**
015     * ID projection between a master ID and a client ID.
016     *
017     * @author Gabor Imre
018     */
019    public interface IdProjector {
020    
021        /**
022         * Master ID from a client ID.
023         *
024         * @param clientId Client ID
025         * @return Associated master ID
026         */
027        int getMasterId(int clientId);
028    
029        /**
030         * Associated client ID if present.
031         *
032         * @param masterId Master ID
033         * @return Associated client ID if present
034         */
035        Optional<Integer> getClientId(int masterId);
036    
037    }