I didnt know how to word the question, so sorry if it doesnt really make sense, but it should start making sense here. Also, I am sorry if the solution is really, really simple. Google couldnt understand what I was asking (probs cause I was asking it wrong :P)
So I wrote a class that I called OrderSelection
In my program I need to have an array of OrderSelection objects, and I need to perform actions on this array (re-ordering, sorting etc).
What I am doing right now is keeping methods in the OrderSelection class that accept, among others, the array which you want to re-order, for example.
something like:
public void reorder(OrderSelection[] ord, int switchX, int switchY){....}
But What I want to be able to do is this:
OrderSelection[] order = new OrderSelection[10];
//do stuff
order.reorder(1,2);//which is WAY better than order[0].reorder(order, 1,2) as a horrid example
So yeah...how can I add these functions which I want to apply to an array of objects of my class?
thanks!