Package org.knowm.xchart.internal
Class Utils
- java.lang.Object
-
- org.knowm.xchart.internal.Utils
-
public class Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUtils()Private Constructor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringaddFileExtension(java.lang.String fileName, java.lang.String fileExtension)Only adds the extension of the fileExtension to the filename if the filename doesn't already have it.static double[]getDoubleArrayFromDateList(java.util.List<?> data)static double[]getDoubleArrayFromFloatArray(float[] data)static double[]getDoubleArrayFromIntArray(int[] data)static double[]getDoubleArrayFromNumberList(java.util.List<?> data)static double[]getGeneratedDataAsArray(int length)static java.util.List<java.lang.Double>getGeneratedDataAsList(int length)static long[]getLongArrayFromFloatArray(float[] data)static long[]getLongArrayFromIntArray(int[] data)static long[]getLongArrayFromNumberList(java.util.List<?> data)static java.util.List<java.lang.Double>getNumberListFromDoubleArray(double[] data)static java.util.List<java.lang.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 Detail
-
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
public static java.util.List<java.lang.Double> getNumberListFromDoubleArray(double[] data)
-
getNumberListFromIntArray
public static java.util.List<java.lang.Double> getNumberListFromIntArray(int[] data)
-
getGeneratedDataAsList
public static java.util.List<java.lang.Double> getGeneratedDataAsList(int length)
-
getDoubleArrayFromFloatArray
public static double[] getDoubleArrayFromFloatArray(float[] data)
-
getDoubleArrayFromIntArray
public static double[] getDoubleArrayFromIntArray(int[] data)
-
getDoubleArrayFromNumberList
public static double[] getDoubleArrayFromNumberList(java.util.List<?> data)
-
getDoubleArrayFromDateList
public static double[] getDoubleArrayFromDateList(java.util.List<?> data)
-
getGeneratedDataAsArray
public static double[] getGeneratedDataAsArray(int length)
-
getLongArrayFromIntArray
public static long[] getLongArrayFromIntArray(int[] data)
-
getLongArrayFromFloatArray
public static long[] getLongArrayFromFloatArray(float[] data)
-
getLongArrayFromNumberList
public static long[] getLongArrayFromNumberList(java.util.List<?> data)
-
addFileExtension
public static java.lang.String addFileExtension(java.lang.String fileName, java.lang.String fileExtension)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
-
-