/** Adds an element considering the values in the same order as the current channels in the array. The n_th value must have the * same type and stride of the given channel at position n */ public void addElement (Object... values) { /* FIXME make it grow... */ if (size == capacity) throw new GdxRuntimeException("Capacity reached, cannot add other elements"); int k = 0; for (Channel strideArray : arrays) { strideArray.add(k, values); k += strideArray.strideSize; } ++size; }
/** Sets the capacity. Each contained channel will be resized to match the required capacity and the current data will be * preserved. */ public void setCapacity (int requiredCapacity) { if (capacity != requiredCapacity) { for (Channel channel : arrays) { channel.setCapacity(requiredCapacity); } capacity = requiredCapacity; } }
/** Removes the element at the given index and swaps it with the last available element */ public void removeElement (int index) { int last = size - 1; // Swap for (Channel strideArray : arrays) { strideArray.swap(index, last); } size = last; }
/** Adds an element considering the values in the same order as the current channels in the array. The n_th value must have the * same type and stride of the given channel at position n */ public void addElement (Object... values) { /* FIXME make it grow... */ if (size == capacity) throw new GdxRuntimeException("Capacity reached, cannot add other elements"); int k = 0; for (Channel strideArray : arrays) { strideArray.add(k, values); k += strideArray.strideSize; } ++size; }
/** Removes the element at the given index and swaps it with the last available element */ public void removeElement (int index) { int last = size - 1; // Swap for (Channel strideArray : arrays) { strideArray.swap(index, last); } size = last; }
/** Removes the element at the given index and swaps it with the last available element */ public void removeElement (int index) { int last = size - 1; // Swap for (Channel strideArray : arrays) { strideArray.swap(index, last); } size = last; }
/** Adds an element considering the values in the same order as the current channels in the array. The n_th value must have the * same type and stride of the given channel at position n */ public void addElement (Object... values) { /* FIXME make it grow... */ if (size == capacity) throw new GdxRuntimeException("Capacity reached, cannot add other elements"); int k = 0; for (Channel strideArray : arrays) { strideArray.add(k, values); k += strideArray.strideSize; } ++size; }
/** Sets the capacity. Each contained channel will be resized to match the required capacity and the current data will be * preserved. */ public void setCapacity (int requiredCapacity) { if (capacity != requiredCapacity) { for (Channel channel : arrays) { channel.setCapacity(requiredCapacity); } capacity = requiredCapacity; } }
/** Sets the capacity. Each contained channel will be resized to match the required capacity and the current data will be * preserved. */ public void setCapacity (int requiredCapacity) { if (capacity != requiredCapacity) { for (Channel channel : arrays) { channel.setCapacity(requiredCapacity); } capacity = requiredCapacity; } }