Package org.knowm.xchart.internal
Class Utils
java.lang.Object
org.knowm.xchart.internal.Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addFileExtension
(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) getGeneratedDataAsList
(int length) static long[]
getLongArrayFromFloatArray
(float[] data) static long[]
getLongArrayFromIntArray
(int[] data) static long[]
getLongArrayFromNumberList
(List<?> data) getNumberListFromDoubleArray
(double[] data) getNumberListFromIntArray
(int[] data) static double
getTickStartOffset
(double workingSpace, double tickSpace) Gets the offset for the beginning of the tick marksstatic double
pow
(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
-