001/* =========================================================== 002 * Orson Charts : a 3D chart library for the Java(tm) platform 003 * =========================================================== 004 * 005 * (C)opyright 2013-2016, by Object Refinery Limited. All rights reserved. 006 * 007 * http://www.object-refinery.com/orsoncharts/index.html 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 com.orsoncharts.data.xyz; 034 035import java.util.List; 036import com.orsoncharts.data.Dataset3D; 037import com.orsoncharts.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 */ 044public interface XYZDataset extends Dataset3D { 045 046 /** 047 * Returns the number of series in the dataset. 048 * 049 * @return The number of series in the dataset. 050 */ 051 int getSeriesCount(); 052 053 /** 054 * Returns a list of the series-keys for the dataset. Modifying this 055 * list will have no impact on the underlying dataset. 056 * 057 * @return A list of the series-keys (possibly empty, but never 058 * {@code null}). 059 */ 060 List<Comparable<?>> getSeriesKeys(); 061 062 /** 063 * Returns the key for the specified series. 064 * 065 * @param index the series index. 066 * 067 * @return The series key. 068 * 069 * @since 1.3 070 */ 071 Comparable<?> getSeriesKey(int index); 072 073 /** 074 * Returns the index of the specified series key, or {@code -1} if 075 * the key is not found. 076 * 077 * @param key the key ({@code null} not permitted). 078 * 079 * @return The index of the key, or {@code -1}. 080 */ 081 int getSeriesIndex(Comparable<?> key); 082 083 /** 084 * Returns the number of items in a given series. 085 * 086 * @param series the series index. 087 * 088 * @return The item count. 089 */ 090 int getItemCount(int series); 091 092 /** 093 * Returns the x-value for an item in a series. 094 * 095 * @param series the series index. 096 * @param item the item index. 097 * 098 * @return The x-value. 099 */ 100 double getX(int series, int item); 101 102 /** 103 * Returns the y-value for an item in a series. 104 * 105 * @param series the series index. 106 * @param item the item index. 107 * 108 * @return The y-value. 109 */ 110 double getY(int series, int item); 111 112 /** 113 * Returns the z-value for an item in a series. 114 * 115 * @param series the series index. 116 * @param item the item index. 117 * 118 * @return The z-value. 119 */ 120 double getZ(int series, int item); 121 122}