Class Utils

java.lang.Object
org.knowm.xchart.internal.Utils

public class Utils extends Object
  • 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

      public static List<Double> getNumberListFromDoubleArray(double[] data)
    • getNumberListFromIntArray

      public static List<Double> getNumberListFromIntArray(int[] data)
    • getGeneratedDataAsList

      public static List<Double> getGeneratedDataAsList(int length)
    • getDoubleArrayFromFloatArray

      public static double[] getDoubleArrayFromFloatArray(float[] data)
    • getDoubleArrayFromIntArray

      public static double[] getDoubleArrayFromIntArray(int[] data)
    • getDoubleArrayFromNumberList

      public static double[] getDoubleArrayFromNumberList(List<?> data)
    • getDoubleArrayFromDateList

      public static double[] getDoubleArrayFromDateList(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(List<?> data)
    • addFileExtension

      public static String addFileExtension(String fileName, String fileExtension)
      Only adds the extension of the fileExtension to the filename if the filename doesn't already have it.
      Parameters:
      fileName - File name
      fileExtension - File extension
      Returns:
      filename (if extension already exists), otherwise;: filename + fileExtension