001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    
018    package org.apache.commons.math3.optimization.univariate;
019    
020    import java.io.Serializable;
021    
022    /**
023     * This class holds a point and the value of an objective function at this
024     * point.
025     * This is a simple immutable container.
026     *
027     * @version $Id: UnivariatePointValuePair.java 1422230 2012-12-15 12:11:13Z erans $
028     * @deprecated As of 3.1 (to be removed in 4.0).
029     * @since 3.0
030     */
031    @Deprecated
032    public class UnivariatePointValuePair implements Serializable {
033        /** Serializable version identifier. */
034        private static final long serialVersionUID = 1003888396256744753L;
035        /** Point. */
036        private final double point;
037        /** Value of the objective function at the point. */
038        private final double value;
039    
040        /**
041         * Build a point/objective function value pair.
042         *
043         * @param point Point.
044         * @param value Value of an objective function at the point
045         */
046        public UnivariatePointValuePair(final double point,
047                                        final double value) {
048            this.point = point;
049            this.value = value;
050        }
051    
052        /**
053         * Get the point.
054         *
055         * @return the point.
056         */
057        public double getPoint() {
058            return point;
059        }
060    
061        /**
062         * Get the value of the objective function.
063         *
064         * @return the stored value of the objective function.
065         */
066        public double getValue() {
067            return value;
068        }
069    }