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    
011    package com.chemaxon.overlap.unguarded;
012    
013    import com.chemaxon.descriptors.common.FloatVectorDescriptor;
014    import com.google.common.base.Function;
015    import java.io.Serializable;
016    
017    /**
018     * Extract <code>float []</code> fp from a {@link FloatVectorDescriptor}.
019     *
020     * <p>Note that this implementation might return the internal representation of the descriptor!</p>
021     *
022     * @author Gabor Imre
023     */
024    public class ExtractFloatFp implements Function<FloatVectorDescriptor, float[]>, Serializable {
025    
026        /**
027         * Serial version.
028         */
029        private static final long serialVersionUID = 0;
030    
031        @Override
032        public float[] apply(FloatVectorDescriptor input) {
033            return input.getFP();
034        }
035    
036        @Override
037        public String toString() {
038            return "Extract float [] vector representation from FloastVectorDescriptor";
039        }
040    
041    }