Collection¶
Definition¶
Extends¶
Extended By¶
Method Summary¶
Owner | Name | Return Type | Description |
---|---|---|---|
Collection | addAll(valuesToAdd) | Object | Adds all elements contained in the iterable to this collection |
Collection | clear() | Boolean | Removes all elements in this collection. Returns "true" if this operation removed at least 1 element, returns "false" if it was empty. |
Object | getClassName() | String | Returns the string name of this object's class type. |
Iterable | iterator() | Iterator | Returns an iterator over this container's objects. Methods are defined in the Iterator class. |
Collection | size() | Integer | Returns the size of this collection |
Collection | sort() | List | Returns a sorted list of the specified collection. Sorting is done according to the elements' type's natural ordering. This sort is guaranteed to be stable, equal elements will not be reordered as a result of the sort. |
Object | toJson() | String | Returns a string of a json representation of this object. |
Method Definitions¶
addAll(valuesToAdd)¶
Object Collection::addAll(Iterable valuesToAdd)
Description¶
Adds all elements contained in the iterable to this collection
Parameter Definition¶
Name | Type | Description |
---|---|---|
valuesToAdd | Iterable | The values to add to this collection |
clear()¶
Boolean Collection::clear()
Description¶
Removes all elements in this collection. Returns "true" if this operation removed at least 1 element, returns "false" if it was empty.
getClassName()¶
Description¶
Returns the string name of this object's class type.
Example 7¶
Example 8¶
iterator()¶
Description¶
Returns an iterator over this container's objects. Methods are defined in the Iterator class.
size()¶
Integer Collection::size()
Description¶
Returns the size of this collection
sort()¶
List Collection::sort()
Description¶
Returns a sorted list of the specified collection. Sorting is done according to the elements' type's natural ordering. This sort is guaranteed to be stable, equal elements will not be reordered as a result of the sort.
toJson()¶
Description¶
Returns a string of a json representation of this object.