com.ijchart.xychart.util
Class ArrayUtil

java.lang.Object
  extended by com.ijchart.xychart.util.ArrayUtil

public abstract class ArrayUtil
extends java.lang.Object

Title: IJChart

Description: a chart library for the Java(tm) platform.

Nice static helpers for working with array.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Constructor Summary
ArrayUtil()
           
 
Method Summary
static double[] calculateCumulativePercentData(double[] datas)
           Calculate the cumulative percent datas.
static double[] calculateCumulativePercentData(int[] datas)
           Calculate the cumulative percent datas.
static double[] calculatePercentData(double[] datas)
           Calculate the percent datas.
static double[] calculatePercentData(int[] datas)
           Calculate the percent datas.
static double[] reverseArray(double[] arr)
           Reverse the array of elements.
static int[] reverseArray(int[] arr)
           Reverse the array of elements.
static java.lang.String[] reverseArray(java.lang.String[] arr)
           Reverse the array of elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtil

public ArrayUtil()
Method Detail

reverseArray

public static java.lang.String[] reverseArray(java.lang.String[] arr)
Reverse the array of elements.

Parameters:
arr - String[] To deal with the array (null permitted).
Returns:
String[] After the reversal element of the array.

reverseArray

public static double[] reverseArray(double[] arr)
Reverse the array of elements.

Parameters:
arr - double[] To deal with the array (null permitted).
Returns:
double[] After the reversal element of the array.

reverseArray

public static int[] reverseArray(int[] arr)
Reverse the array of elements.

Parameters:
arr - int[] To deal with the array (null permitted).
Returns:
double[] After the reversal element of the array.

calculateCumulativePercentData

public static double[] calculateCumulativePercentData(double[] datas)
Calculate the cumulative percent datas.

Parameters:
datas - double[] To deal with the array (null permitted).
Returns:
double[]

calculateCumulativePercentData

public static double[] calculateCumulativePercentData(int[] datas)
Calculate the cumulative percent datas.

Parameters:
datas - int[] To deal with the array (null permitted).
Returns:
double[]

calculatePercentData

public static double[] calculatePercentData(double[] datas)
Calculate the percent datas.

Parameters:
datas - double[] To deal with the array (null permitted).
Returns:
double[]

calculatePercentData

public static double[] calculatePercentData(int[] datas)
Calculate the percent datas.

Parameters:
datas - int[] To deal with the array (null permitted).
Returns:
double[]