GroupOrItemCreateList

int ro size

The number of GroupOrItems in the list


List<GroupOrItem> asList()

Returns a List of GroupOrItems with the same contents as this one.


boolean contains(GroupOrItem object)

Returns true if object is in this list.


Parameters:
object 


SList<GroupOrItem> create(Object... content)

For each argument, creates a new GroupOrItem and initializes it from that argument, then adds it to the list.


Parameters:
content 


SList<Item> create(Collection<Object> list)

For each element in list, creates a new item and initializes it from that element, then adds it to this list.


Parameters:
list 


SList<Item> create(int count)

Creates count new items, adds them to the list, and returns a sublist containing them.


Parameters:
count 


Item create()

Creates a new item, adds it to the list, then returns it.


Item create(Object content)

Creates a new item, initializes it from content, then adds it to the list.


Parameters:
content 


SList<Item> createAt(int index, Object... content)

Initializes a list of items from the list of content arguments and inserts the new items into this list at index.


Parameters:
index 
content 


Item createAt(int index)

Creates a new item, inserts it at index, then returns it.


Parameters:
index 


SList<Item> createAt(int index, int count)

Creates count new items, inserts them at index, and returns a sublist containing them.


Parameters:
index 
count 


Item createAt(int index, Object content)

Creates an item, intializes it from content, and inserts it at index. Returns the initialized item.


Parameters:
index 
content 


SList<Item> createAt(int index, Collection<Object> list)

Initializes a list of items from the elements in list and inserts the new items into this list at index.


Parameters:
index 
list 


Group createGroup(Object groupName, Collection<Object> items)

Creates a new group with name groupName, adds the items in items to it, then adds it to this list.


Parameters:
groupName 
items 


Group createGroup(Object groupName, int itemCount)

Creates a new group with name groupName, and containing itemCount new items, then adds the grouop to this list.


Parameters:
groupName 
itemCount 


Group createGroup(Object groupName, int start, int end)

Removes the elements between start and end from this child list and adds them to a group named groupName, then adds that group to the list. Returns the added group.


Parameters:
groupName 
start 
end 


Group createGroup(Object groupName, GroupOrItem start, GroupOrItem end)

Removes the elements between the index of start and the index of end from this child list and adds them to a group named groupName, then adds that group to the list. Returns the added group.


Parameters:
groupName 
start 
end 


void each(Closure block)

Executes the code in block on each GroupOrItem in this list.


Parameters:
block 


SList<GroupOrItem> find(String pattern)

Returns a list of GroupOrItems whose names match a regular expression.

The given pattern is matched against the full name of each list element. This means, for example, that the pattern "foo" will match an element named "foo" but not one named "foobar", while the pattern "foo.*" will match both.


Parameters:
pattern 


void forEach(Consumer<Object> action)

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of iteration (if an iteration order is specified). Exceptions thrown by the action are relayed to the caller.
Implementation Requirements:

The default implementation behaves as if:


     for (T t : this)
         action.accept(t);
 
Parameters:
action - The action to be performed for each element
Throws:
NullPointerException - if the specified action is null
Since:
1.8



SList<GroupOrItem> get(Collection<Object> names)

Returns a list of GroupOrItems whose names are in the given collection.


Parameters:
names 


GroupOrItem get(int index)

Returns the GroupOrItem at index index.


Parameters:
index 


int indexOf(GroupOrItem object)

Returns the index of object in this list, or -1 if not found.


Parameters:
object 


Iterator<GroupOrItem> iterator()

Returns an iterator over the GroupOrItems in this list.


Spliterator<GroupOrItem> spliterator()

Creates a Spliterator over the elements described by this Iterable.
Implementation Requirements:
The default implementation creates an early-binding spliterator from the iterable's Iterator. The spliterator inherits the fail-fast properties of the iterable's iterator.
Implementation Note:
The default implementation should usually be overridden. The spliterator returned by the default implementation has poor splitting capabilities, is unsized, and does not report any spliterator characteristics. Implementing classes can nearly always provide a better implementation.
Returns:
a Spliterator over the elements described by this Iterable.
Since:
1.8