/**
 * Copyright 2011 The PlayN Authors
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package playn.core;

/**
 * TODO - Need to add javadoc
 */
public interface GroupLayer extends Layer {

  /**
   * Returns the layer at the specified position.
   */
  Layer get(int index);

  /**
   * Adds a layer to the bottom of the group.
   * <p>
   * Because the {@link Layer} hierarchy is a tree, if the {@link Layer} is already a child of
   * another {@link GroupLayer}, it will be removed before being added to this {@link GroupLayer}.
   */
  void add(Layer layer);

  /**
   * @deprecated Use {@link Layer#setDepth} to manage render order.
   */
  @Deprecated
  void add(int index, Layer layer);

  /**
   * Removes a layer from the group.
   */
  void remove(Layer layer);

  /**
   * @deprecated Manual index management has been deprecated in favor of {@link Layer#setDepth}.
   * Use {@link #remove(Layer)} to remove layers.
   */
  @Deprecated
  void remove(int index);

  /**
   * Removes all the layers from this group.
   */
  void clear();

  /**
   * Returns the number of layers in this group.
   */
  int size();
}

@@ -626,34 +626,93 @@
 %0A * 
-TODO - Need to add javadoc
+GroupLayer creates a Layer hierarchy by maintaining an ordered group of child Layers.
 %0A */
@@ -807,16 +807,145 @@
 ied 
-position
+index.%0A   * %3Cp%3E%0A   * Layers are ordered in terms of their depth and will be returned in this order, with 0 being the%0A   * layer on bottom
 .%0A  

Document GroupLayer.get(index) ordering