Built-In Object Type: Set

Inherits All
(MORE DESCRIPTION TO COME.)
Methods:
NameArgumentsDescription
average
avg
  Returns the average of all the numbers in this set.
clear
  Clears all the elements in this set. Adds all the elements into this set.
concat
separator
Returns a string that is a concatenation of all the elements, separated by separator. If no separator specified, default use ','.
exists
value
comparatorFunction
Returns true if a match of value in this set is found, based on the comparatorFunction, or -1 if not found. If no comparatorFunction specified, use the "natural" order.
loadAsLine
fileName
Load all lines in the text file as elements.
max
  Returns the biggest of all the numbers in this set. It is an integer if all the elements are integers; otherwise it is float.
min
  Returns the smallest of all the numbers in this set. It is an integer if all the elements are integers; otherwise it is float.
range
  Returns an array of two values: the smallest and biggest. They are integers if all the elements are integers; otherwise they are float.
remove
elem
Removes the elem, if it exists.
saveAsLine
fileName
Write all elements into a file as lines. If values are strings containing newlines, the values will be confused.
size
length
  Returns the size of this set.
sort
comparatorFunction
Sorts this set locally and returns self. If comparatorFunction is not specified, use the "natural" order of the elements.
sortAsDate
  Sorts this set as dates locally and returns self.
sortAsNumber
  Sorts this set as numbers locally and returns self.
sortAsString
  Sorts this set as strings locally and returns self.
subset
filterFunction
Returns a sub-set of this for elements that are qualified by filterFunction.
sum
  Returns the sum of all the numbers in this set. The sum is an integer if all the elements are integers; otherwise sum is float.
toArray
  Returns an array of all the elements.
toBooleanArray
  Returns a Java array of boolean[].
toBooleanObjectArray
  Returns a Java array of java.lang.Boolean[].
toByteArray
  Returns a Java array of byte[].
toByteObjectArray
  Returns a Java array of java.lang.Byte[].
toCharArray
  Returns a Java array of char[].
toCharObjectArray
  Returns a Java array of java.lang.Character[].
toDoubleArray
  Returns a Java array of double[].
toDoubleObjectArray
  Returns a Java array of java.lang.Double[].
toFloatArray
  Returns a Java array of float[].
toFloatObjectArray
  Returns a Java array of java.lang.Float[].
toIntArray
  Returns a Java array of int[].
toIntObjectArray
  Returns a Java array of java.lang.Integer[].
toJavaSet
  Returns a java.util.Set instance containing all the elements as java.lang.Object's.
toLongArray
  Returns a Java array of long[].
toLongObjectArray
  Returns a Java array of java.lang.Long[].
toObjectArray
  Returns a Java array of java.lang.Object[].
toShortArray
  Returns a Java array of short[].
toShortObjectArray
  Returns a Java array of java.lang.Short[].
toStringArray
  Returns a Java array of java.lang.String[].