ListHelper

com.netflix.atlas.core.util.ListHelper
object ListHelper

Helper functions for working with lists.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ListHelper.type

Members list

Value members

Concrete methods

def merge[T <: Comparable[LazyRef(...)]](limit: Int, v1: List[T], v2: List[T]): List[T]

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Value parameters

limit

Maximum number of items in the resulting list.

v1

A sorted list to merge.

v2

A sorted list to merge.

Attributes

Returns

Sorted list with a max size of limit.

def merge[T](limit: Int, comparator: Comparator[T], v1: List[T], v2: List[T]): List[T]

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Value parameters

comparator

Comparator to use for determining the order of elements.

limit

Maximum number of items in the resulting list.

v1

A sorted list to merge.

v2

A sorted list to merge.

Attributes

Returns

Sorted list with a max size of limit.

def merge[T](limit: Int, comparator: Comparator[T], aggrF: (T, T) => T, v1: List[T], v2: List[T]): List[T]

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup two sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

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

Maximum number of items in the resulting list.

v1

A sorted list to merge.

v2

A sorted list to merge.

Attributes

Returns

Sorted list with a max size of limit.

def merge[T <: Comparable[LazyRef(...)] : ClassTag](limit: Int, vs: List[List[T]]): List[T]

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Value parameters

limit

Maximum number of items in the resulting list.

vs

A list of sorted lists to merge.

Attributes

Returns

Sorted list with a max size of limit.

def merge[T : ClassTag](limit: Int, comparator: Comparator[T], vs: List[List[T]]): List[T]

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Value parameters

comparator

Comparator to use for determining the order of elements.

limit

Maximum number of items in the resulting list.

vs

A list of sorted lists to merge.

Attributes

Returns

Sorted list with a max size of limit.

def merge[T : ClassTag](limit: Int, comparator: Comparator[T], aggrF: (T, T) => T, vs: List[List[T]]): List[T]

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

Merge and dedup sorted lists up to the specified limit. The input lists must already be sorted and should not contain duplicate values.

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

Maximum number of items in the resulting list.

vs

A list of sorted lists to merge.

Attributes

Returns

Sorted list with a max size of limit.