The constructor for
DefaultCategoryDataset(String[] seriesNames, Object[] categories, Number[][] data) in 5.5 is listed like this.
My code before used DefaultCategoryDataset(seriesNames, categories, data);
where seriesNames was an arraylist
categories was an arraylist
data was Number[][]
For 5.5, I converted seriesNames to a string array. But I am a bit confused about Object[]. Can I cast an Arraylist to an object and vice versa? If so, how do I briefly code it?
object in
Re: object in
Hi Randy,
Sorry for the delay...
The List interface defines a method toArray() so you can use that from your ArrayList to create an array of Objects.
The Arrays class (a utility class) defines a method asList(Object[]) that returns a List of objects from an array.
Hope that helps,
Dave Gilbert
Sorry for the delay...
The List interface defines a method toArray() so you can use that from your ArrayList to create an array of Objects.
The Arrays class (a utility class) defines a method asList(Object[]) that returns a List of objects from an array.
Hope that helps,
Dave Gilbert