# Class: GroupArray

### LuxModule: luxinialuacore

A grouparray is an array that groups a couple of elements and behaves like one of them. This will only be done for pure indexed array of this group, not for named arrays (arrays that elements are indexed by numbers).

This class is experimental.

### Example:

     test = GroupArray.new({
       l2dtext.new("test","test",0),
       l2dtext.new("test","test",0),
     }) test:color(0,0,0,1)

### Result:

both l2dtext elements will be colored black. The call will return a list of all results grouped in tables.

## Methods:

new (table atable,[boolean docopy])
  returns: (GroupArray)
  returns a GroupArray of the given table. It does nothing more than setting the table's metatable to the GroupArray table. If docopy is true, the given array is copied.
get (GroupArray,[index])
  returns: ([value]/[...])
  calls rawget if index is supplied, otherwise it returns all numbered elements of the array.