org.eclipse.emf.ecp.spi.core.util
Interface InternalChildrenList

All Known Implementing Classes:
ChildrenListImpl

public interface InternalChildrenList

This class defines a List.

Since:
1.1
Author:
Eike Stepper, Eugen Neufeld

Method Summary
 void addChild(Object child)
          Adds a child to the list.
<T> void
addChildren(Collection<T> children)
          Adds a list of children to the list.
<T> void
addChildren(T... children)
           
 void addChildWithoutRefresh(Object child)
           
 Object getChild(int index)
          Returns the object with this index from the list.
 Object[] getChildren()
          Returns the children of this list.
 Object getParent()
          Return the parent element of this list.
 boolean hasChildren()
          Whether this list has children.
 boolean isComplete()
          Whether this list is complete or not.
 boolean isSlow()
          Whether this list is slow or not.
 void setComplete()
           
 int size()
          The size of the list.
 

Method Detail

size

int size()
The size of the list.

Returns:
number of elements in the list

hasChildren

boolean hasChildren()
Whether this list has children.

Returns:
true if this list has children, false otherwise.

getChildren

Object[] getChildren()
Returns the children of this list.

Returns:
an array containing all children

getChild

Object getChild(int index)
Returns the object with this index from the list. Throws an IndexOutOfBoundException if index is invalid.

Parameters:
index - the index of the element to get
Returns:
the element

getParent

Object getParent()
Return the parent element of this list.

Returns:
the parent of the list

isSlow

boolean isSlow()
Whether this list is slow or not.

Returns:
true if it is slow, false otherwise

isComplete

boolean isComplete()
Whether this list is complete or not.

Returns:
true if it is complete, false otherwise

addChildWithoutRefresh

void addChildWithoutRefresh(Object child)

addChild

void addChild(Object child)
Adds a child to the list.

Parameters:
child - the child

addChildren

<T> void addChildren(T... children)

addChildren

<T> void addChildren(Collection<T> children)
Adds a list of children to the list.

Parameters:
children - a collection of new children

setComplete

void setComplete()


Copyright © 2014. All Rights Reserved.