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.unguarded;
011    
012    import java.util.List;
013    
014    /**
015     * Simple callback to traverse an unguarded storage.
016     *
017     * @param <T> Type of unguarded representation
018     *
019     * @author Gabor Imre
020     */
021    public interface UnguardedVisitor<T> {
022    
023        /**
024         * Visit a single descriptor.
025         *
026         * @param index Index of the descriptor
027         * @param descriptor Unguarded representation
028         */
029        void visitDescriptor(int index, T descriptor);
030    
031        /**
032         * Visit multiple descriptors.
033         *
034         * @param firstIndex Index of the first descriptor
035         * @param descriptors List of descriptors
036         */
037        void visitDescriptors(int firstIndex, List<T> descriptors);
038    }