Package org.knowm.xchart.internal
Class Utils
java.lang.Object
org.knowm.xchart.internal.Utils
public class Utils extends Object
- Author:
- timmolter
-
Method Summary
Modifier and Type Method Description static StringaddFileExtension(String fileName, String fileExtension)Only adds the extension of the fileExtension to the filename if the filename doesn't already have it.static double[]getDoubleArrayFromDateList(List<?> data)static double[]getDoubleArrayFromFloatArray(float[] data)static double[]getDoubleArrayFromIntArray(int[] data)static double[]getDoubleArrayFromNumberList(List<?> data)static double[]getGeneratedDataAsArray(int length)static List<Double>getGeneratedDataAsList(int length)static long[]getLongArrayFromFloatArray(float[] data)static long[]getLongArrayFromIntArray(int[] data)static long[]getLongArrayFromNumberList(List<?> data)static List<Double>getNumberListFromDoubleArray(double[] data)static List<Double>getNumberListFromIntArray(int[] data)static doublegetTickStartOffset(double workingSpace, double tickSpace)Gets the offset for the beginning of the tick marksstatic doublepow(double base, int exponent)
-
Method Details
-
getTickStartOffset
public static double getTickStartOffset(double workingSpace, double tickSpace)Gets the offset for the beginning of the tick marks- Parameters:
workingSpace-tickSpace-- Returns:
-
pow
public static double pow(double base, int exponent) -
getNumberListFromDoubleArray
-
getNumberListFromIntArray
-
getGeneratedDataAsList
-
getDoubleArrayFromFloatArray
public static double[] getDoubleArrayFromFloatArray(float[] data) -
getDoubleArrayFromIntArray
public static double[] getDoubleArrayFromIntArray(int[] data) -
getDoubleArrayFromNumberList
-
getDoubleArrayFromDateList
-
getGeneratedDataAsArray
public static double[] getGeneratedDataAsArray(int length) -
getLongArrayFromIntArray
public static long[] getLongArrayFromIntArray(int[] data) -
getLongArrayFromFloatArray
public static long[] getLongArrayFromFloatArray(float[] data) -
getLongArrayFromNumberList
-
addFileExtension
Only adds the extension of the fileExtension to the filename if the filename doesn't already have it.- Parameters:
fileName- File namefileExtension- File extension- Returns:
- filename (if extension already exists), otherwise;: filename + fileExtension
-