ArrayHelper
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ArrayHelper.type
Members list
Type members
Classlikes
Helper for merging sorted arrays and lists.
Helper for merging sorted arrays and lists.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Merge two source arrays into a specified destination array.
Merge two source arrays into a specified destination array.
Value parameters
- aggrF
-
Aggregation function to use if duplicate values are encountered. The user should ensure that the aggregation function does not influence the order of the elements.
- comparator
-
Comparator to use for determining the order of elements.
- dst
-
Destination array that will receive the merged data.
- vs1
-
First source array, may be modified. The first position will be set to null if the contents of this array have been fully merged into the destination.
- vs1size
-
Number of valid elements in the first source array.
- vs2
-
Second source array, may be modified. The first position will be set to null if the contents of this array have been fully merged into the destination.
- vs2size
-
Number of valid elements in the second source array.
Attributes
- Returns
-
Number of valid elements in the merged array.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Value parameters
- limit
-
The maximum number of items allowed in the result list. The merge operations will be stopped as soon as the limit is reached.
Attributes
- Returns
-
Object that can be used to merge the arrays.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Value parameters
- comparator
-
Comparator to use for determining the order of elements.
- limit
-
The maximum number of items allowed in the result list. The merge operations will be stopped as soon as the limit is reached.
Attributes
- Returns
-
Object that can be used to merge the arrays.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Creates a merger object that can be used to efficiently merge together sorted arrays of comparable objects.
Value parameters
- aggrF
-
Aggregation function to use if duplicate values are encountered. The user should ensure that the aggregation function does not influence the order of the elements.
- comparator
-
Comparator to use for determining the order of elements.
- limit
-
The maximum number of items allowed in the result list. The merge operations will be stopped as soon as the limit is reached.
Attributes
- Returns
-
Object that can be used to merge the arrays.
Sort array and remove duplicate values from the array. The operations will be done in place and modify the array.
Sort array and remove duplicate values from the array. The operations will be done in place and modify the array.
Value parameters
- data
-
Input data to sort. The array should be full.
Attributes
- Returns
-
Length of the valid data in the array after removing duplicates.
Sort array and remove duplicate values from the array. The operations will be done in place and modify the array.
Sort array and remove duplicate values from the array. The operations will be done in place and modify the array.
Value parameters
- aggrF
-
Aggregation function to use if duplicate values are encountered. The user should ensure that the aggregation function does not influence the order of the elements.
- comparator
-
Comparator to use for determining the order of elements.
- data
-
Input data to sort.
- length
-
Amount of data in the array to consider for the sort.
Attributes
- Returns
-
Length of the valid data in the array after removing duplicates.
Sort a string array that consists of tag key/value pairs by key. The array will be sorted in-place. The pair arrays are supposed to be fairly small, typically less than 20 tags. With the small size a simple insertion sort works well.
Sort a string array that consists of tag key/value pairs by key. The array will be sorted in-place. The pair arrays are supposed to be fairly small, typically less than 20 tags. With the small size a simple insertion sort works well.
Attributes
Sort a string array that consists of tag key/value pairs by key. The array will be sorted in-place. The pair arrays are supposed to be fairly small, typically less than 20 tags. With the small size a simple insertion sort works well.
Sort a string array that consists of tag key/value pairs by key. The array will be sorted in-place. The pair arrays are supposed to be fairly small, typically less than 20 tags. With the small size a simple insertion sort works well.