BiSort
Collection of static functions used for sorting and comparing
This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiSort .
Constructor
new BiSort ( )
Parameters
No parameters.
Properties
None.
Methods
None.
Events
None.
Static Methods
| Name | Description |
caseInsensitiveStringCompare | A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive. |
dateCompare | A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
lessThanCompare | A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
numberCompare | A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
stringCompare | A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). |
Static Fields
None.
Remarks
None.
Static Method Details
caseInsensitiveStringCompare
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero). This comparison is case insensitive.
Syntax
BiSort . caseInsensitiveStringCompare ( s1,s2 ) Parameters
| Name | Type | Optional | Default | Descripton |
s1 | String | The first string | ||
s2 | String | The second string |
Return Type
Number
dateCompare
A function taking two Date objects and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiSort . dateCompare ( d1,d2 ) Parameters
| Name | Type | Optional | Default | Descripton |
d1 | Date | The first date | ||
d2 | Date | The second date |
Return Type
Number
lessThanCompare
A function taking two objects and uses the built in less than operator to compare them and returns a number (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiSort . lessThanCompare ( v1,v2 ) Parameters
| Name | Type | Optional | Default | Descripton |
v1 | Object | The first value | ||
v2 | Object | The second value |
Return Type
Number
numberCompare
A function taking two number arguments and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiSort . numberCompare ( n1,n2 ) Parameters
| Name | Type | Optional | Default | Descripton |
n1 | Number | The first number | ||
n2 | Number | The second number |
Return Type
Number
stringCompare
A function taking two strings and returns a number used to compare them (less than zero if first is smaller, zero if equal and otherwise larger than zero).
Syntax
BiSort . stringCompare ( s1,s2 ) Parameters
| Name | Type | Optional | Default | Descripton |
s1 | String | The first string | ||
s2 | String | The second string |
Return Type
Number