Methods

hasAll

hasAll(list) returns rules.Boolean

Determine whether the list contains all elements in another list.

Parameter

list

rules.List

The list of elements to look for.

Value must not be null.

Returns

non-null rules.Boolean true if this list contains all elements in the other.

hasAny

hasAny(list) returns rules.Boolean

Determine whether the list contains any element in another list.

Parameter

list

rules.List

The list of elements to look for.

Value must not be null.

Returns

non-null rules.Boolean true if this list contains any element in the other.

hasOnly

hasOnly(list) returns rules.Boolean

Determine whether all elements in the list are present in another list.

Parameter

list

rules.List

The list of elements to look for.

Value must not be null.

Returns

non-null rules.Boolean true if all elements in the list are present in another list, excluding repeated elements.

Example

['a', 'b'].hasOnly(['a', 'c']) == false
['a', 'b'].hasOnly(['a', 'b', 'c']) == true
['a', 'b'].hasOnly(['b', 'a']) == true
['a', 'a', 'b'].hasOnly(['a', 'b', 'b']) == true
['a', 'a', 'b'].hasOnly(['a', 'b', 'b', 'c']) == true

join

join(separator) returns rules.String

Join the elements in the list into a string, with a separator.

Parameter

separator

rules.String

String to separate elements.

Value must not be null.

Returns

non-null rules.String the list joined as a string.

size

size() returns rules.Integer

Get the number of values in the list.

Returns

non-null rules.Integer the number of values in the list.