Skip to content
Reference > Classes

Collection

Definition

Collection var = .... ;

Extends

Extended By

Method Summary

Owner Name Return Type Description
Collection addAll(valuesToAdd) Object adds all elements 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 containers objects
Collection size() Integer Returns the size of this collection
Collection sort() List Returns a list with the specified collection sorted according the elements' 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 json representation of this object.

Method Definitions


addAll(valuesToAdd)

Object Collection::addAll(Iterable valuesToAdd)

Description

adds all elements 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


size()

Integer Collection::size()

Description

Returns the size of this collection


sort()

List Collection::sort()

Description

Returns a list with the specified collection sorted according the elements' natural ordering. This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort