001/* =========================================================== 002 * Orson Charts : a 3D chart library for the Java(tm) platform 003 * =========================================================== 004 * 005 * (C)opyright 2013-2022, by David Gilbert. All rights reserved. 006 * 007 * https://github.com/jfree/orson-charts 008 * 009 * This program is free software: you can redistribute it and/or modify 010 * it under the terms of the GNU General Public License as published by 011 * the Free Software Foundation, either version 3 of the License, or 012 * (at your option) any later version. 013 * 014 * This program is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 017 * GNU General Public License for more details. 018 * 019 * You should have received a copy of the GNU General Public License 020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 021 * 022 * [Oracle and Java are registered trademarks of Oracle and/or its affiliates. 023 * Other names may be trademarks of their respective owners.] 024 * 025 * If you do not wish to be bound by the terms of the GPL, an alternative 026 * commercial license can be purchased. For details, please see visit the 027 * Orson Charts home page: 028 * 029 * http://www.object-refinery.com/orsoncharts/index.html 030 * 031 */ 032 033package org.jfree.chart3d.data.xyz; 034 035import java.util.List; 036import org.jfree.chart3d.data.Dataset3D; 037import org.jfree.chart3d.plot.XYZPlot; 038 039/** 040 * Defines the methods used to access data in the form of multiple series 041 * containing {@code (x, y, z)} data items. This is the standard 042 * dataset format used by the {@link XYZPlot} class. 043 * 044 * @param <S> The series key type (which must implement Comparable). 045 */ 046public interface XYZDataset<S extends Comparable<S>> extends Dataset3D { 047 048 /** 049 * Returns the number of series in the dataset. 050 * 051 * @return The number of series in the dataset. 052 */ 053 int getSeriesCount(); 054 055 /** 056 * Returns a list of the series-keys for the dataset. Modifying this 057 * list will have no impact on the underlying dataset. 058 * 059 * @return A list of the series-keys (possibly empty, but never 060 * {@code null}). 061 */ 062 List<S> getSeriesKeys(); 063 064 /** 065 * Returns the key for the specified series. 066 * 067 * @param index the series index. 068 * 069 * @return The series key. 070 * 071 * @since 1.3 072 */ 073 S getSeriesKey(int index); 074 075 /** 076 * Returns the index of the specified series key, or {@code -1} if 077 * the key is not found. 078 * 079 * @param key the key ({@code null} not permitted). 080 * 081 * @return The index of the key, or {@code -1}. 082 */ 083 int getSeriesIndex(S key); 084 085 /** 086 * Returns the number of items in a given series. 087 * 088 * @param series the series index. 089 * 090 * @return The item count. 091 */ 092 int getItemCount(int series); 093 094 /** 095 * Returns the x-value for an item in a series. 096 * 097 * @param series the series index. 098 * @param item the item index. 099 * 100 * @return The x-value. 101 */ 102 double getX(int series, int item); 103 104 /** 105 * Returns the y-value for an item in a series. 106 * 107 * @param series the series index. 108 * @param item the item index. 109 * 110 * @return The y-value. 111 */ 112 double getY(int series, int item); 113 114 /** 115 * Returns the z-value for an item in a series. 116 * 117 * @param series the series index. 118 * @param item the item index. 119 * 120 * @return The z-value. 121 */ 122 double getZ(int series, int item); 123 124}