001    /* ============================================================
002     * JRobin : Pure java implementation of RRDTool's functionality
003     * ============================================================
004     *
005     * Project Info:  http://www.jrobin.org
006     * Project Lead:  Sasa Markovic (saxon@jrobin.org)
007     *
008     * Developers:    Sasa Markovic (saxon@jrobin.org)
009     *
010     *
011     * (C) Copyright 2003-2005, by Sasa Markovic.
012     *
013     * This library is free software; you can redistribute it and/or modify it under the terms
014     * of the GNU Lesser General Public License as published by the Free Software Foundation;
015     * either version 2.1 of the License, or (at your option) any later version.
016     *
017     * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
018     * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
019     * See the GNU Lesser General Public License for more details.
020     *
021     * You should have received a copy of the GNU Lesser General Public License along with this
022     * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
023     * Boston, MA 02111-1307, USA.
024     */
025    package org.jrobin.data;
026    
027    /**
028     * <p>Interface to be used for custom datasources.
029     * If you wish to use a custom datasource in a graph, you should create a class implementing this interface
030     * that represents that datasource, and then pass this class on to the RrdGraphDef.</p>
031     */
032    public abstract class Plottable {
033            /**
034             * Retrieves datapoint value based on a given timestamp.
035             * Use this method if you only have one series of data in this class.
036             *
037             * @param timestamp Timestamp in seconds for the datapoint.
038             * @return Double value of the datapoint.
039             */
040            public double getValue(long timestamp) {
041                    return Double.NaN;
042            }
043    }