1 11 package org.eclipse.test.internal.performance.data; 12 13 import java.util.Collection ; 14 import java.util.Map ; 15 import java.util.Set ; 16 17 18 21 public class DataPoint { 22 private int fStep; 23 private Map fScalars; 24 25 public DataPoint(int step, Map values) { 26 fStep= step; 27 fScalars= values; 28 } 29 30 public int getStep() { 31 return fStep; 32 } 33 34 public Dim[] getDimensions() { 35 Set set= fScalars.keySet(); 36 return (Dim[]) set.toArray(new Dim[set.size()]); 37 } 38 39 public Collection getDimensions2() { 40 return fScalars.keySet(); 41 } 42 43 public boolean contains(Dim dimension) { 44 return fScalars.containsKey(dimension); 45 } 46 47 public Scalar[] getScalars() { 48 return (Scalar[]) fScalars.values().toArray(new Scalar[fScalars.size()]); 49 } 50 51 public Scalar getScalar(Dim dimension) { 52 return (Scalar) fScalars.get(dimension); 53 } 54 55 public String toString() { 56 return "DataPoint [step= " + fStep + ", #dimensions: " + fScalars.size() + "]"; } 58 } 59 | Popular Tags |