Libraries.Interface.Controls.Charts.ChartLinePointComparison Documentation

This class provides a way to compare two chart points objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger). It can be used to override the standard comparison in Object for sorting chart points to create an even line. Atrribute: Author Hannah Williams

Inherits from: Libraries.Containers.Support.Comparison, Libraries.Language.Object

Actions Documentation

Compare(number a, number b)

This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting).

Parameters

  • number a
  • number b

Return

integer:

Compare(integer a, integer b)

This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting).

Parameters

  • integer a
  • integer b

Return

integer:

Compare(Libraries.Language.Object left, Libraries.Language.Object right)

This sorts the chart line points so the line is direct This makes an ordered line even when the data is unordered.

Parameters

Return

integer:

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Compare(boolean a, boolean b)

This action provides a way to compare two objects. The returned values from its sole action is an integer with the value of -1 (the left item is smaller), 0 (the items are equal) or 1 (the left item is larger).It can be used to override the standard comparison in Object for various applications (e.g., sorting). In the case of booleans, by default, false is considered less than true.

Parameters

  • boolean a
  • boolean b

Return

integer:

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()