KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > test > internal > performance > db > TimeSeries


1 /*******************************************************************************
2  * Copyright (c) 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.test.internal.performance.db;
12
13 public class TimeSeries {
14     
15     private String JavaDoc[] fBuildNames;
16     private double[] fAverages;
17     private double[] fStddev;
18     
19     TimeSeries(String JavaDoc[] tags, double[] averages, double[] stddev) {
20         fBuildNames= tags;
21         fAverages= averages;
22         fStddev= stddev;
23     }
24     
25     /**
26      * Returns length of series.
27      * @return length of series
28      */

29     public int getLength() {
30         return fBuildNames.length;
31     }
32     
33     /**
34      * Returns value at given index.
35      * @param ix
36      * @return value at given index
37      */

38     public double getValue(int ix) {
39         return fAverages[ix];
40     }
41     
42     /**
43      * Returns std dev at given index.
44      * @param ix
45      * @return std dev at given index
46      */

47     public double getStddev(int ix) {
48         return fStddev[ix];
49     }
50     
51     /**
52      * Returns label at given index.
53      * @param ix
54      * @return label at given index
55      */

56     public String JavaDoc getLabel(int ix) {
57         return fBuildNames[ix];
58     }
59 }
60
Popular Tags