• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2012 AndroidPlot.com
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 
17 package com.androidplot.xy;
18 
19 import android.util.Pair;
20 import com.androidplot.Series;
21 
22 /**
23  * Represents a two dimensional series of data represented as xy values.
24  */
25 public interface XYSeries extends Series<Pair<Number, Number>> {
26 
27     /**
28      * @return Number of elements in this Series.
29      */
size()30     public int size();
31 
32     /**
33      * Returns the x-value for an index within a series.
34      *
35      * @param index  the index index (in the range <code>0</code> to
36      *     <code>size()-1</code>).
37      *
38      * @return The x-value.
39      */
getX(int index)40     public Number getX(int index);
41 
42     /**
43      * Returns the y-value for an index within a series.
44      *
45      * @param index  the index index (in the range <code>0</code> to
46      *     <code>size()-1</code>).
47      *
48      * @return The y-value.
49      */
getY(int index)50     public Number getY(int index);
51 }
52