public abstract class ArraySortBase<T> extends Object implements ArraySort<T>
ArrayAlgorithm.Util| Constructor and Description |
|---|
ArraySortBase() |
| Modifier and Type | Method and Description |
|---|---|
T[] |
apply(T[] ts,
Integer from,
Integer to,
Comparator<T> comp)
Run the function with parameters specified.
|
T[] |
sort(T[] ts,
int from,
int to,
Comparator<T> comp) |
protected abstract T[] |
sort0(T[] ts,
int from,
int to,
Comparator<T> comp,
T[] newTs) |
public final T[] apply(T[] ts, Integer from, Integer to, Comparator<T> comp) throws NotAppliedException, Osgl.Break
Osgl.Func4In case implementing a partial function, it can throw out an
NotAppliedException if the function is not defined for
the given parameter(s)
apply in interface Osgl.Func4<T[],Integer,Integer,Comparator<T>,T[]>ts - the first argumentfrom - the second argumentto - the third argumentcomp - the fourth argumentRNotAppliedException - if the function doesn't apply to the parameter(s)Osgl.Break - to short cut collecting operations (fold/reduce) on an containerprotected abstract T[] sort0(T[] ts, int from, int to, Comparator<T> comp, T[] newTs)
Copyright © 2017. All Rights Reserved.