public final class ScoredIds extends Object
| Modifier and Type | Method and Description |
|---|---|
static Ordering<ScoredId> |
channelOrder(Symbol chan)
An ordering (comparator) that compares IDs by channel.
|
static <T extends Comparable<? super T>> |
channelOrder(TypedSymbol<T> chan)
An ordering (comparator) that compares IDs by typed channel.
|
static <T> Ordering<ScoredId> |
channelOrder(TypedSymbol<T> chan,
Comparator<? super T> order)
An ordering (comparator) that compares IDs by typed channel.
|
static FastCollection<ScoredId> |
collectionFromVector(SparseVector vector)
View a vector as a
FastCollection of ScoredId objects. |
static ScoredIdBuilder |
copyBuilder(ScoredId id)
Create a new builder initialized to copy the specified scored ID.
|
static ScoredId |
create(long id,
double score)
Create a scored id with no channels.
|
static Function<ScoredId,Long> |
idFunction()
A
Function that extracts the ID from a scored ID. |
static Ordering<ScoredId> |
idOrder()
An ordering (comparator) that compares IDs by score.
|
static ScoredIdBuilder |
newBuilder()
Create a new builder.
|
static ScoredIdListBuilder |
newListBuilder()
Create a new list builder.
|
static ScoredIdListBuilder |
newListBuilder(int cap)
Create a new list builder.
|
static Ordering<ScoredId> |
scoreOrder()
An ordering (comparator) that compares IDs by score.
|
public static ScoredIdBuilder copyBuilder(ScoredId id)
id - The scored ID to copy.public static ScoredIdBuilder newBuilder()
public static ScoredIdListBuilder newListBuilder()
public static ScoredIdListBuilder newListBuilder(int cap)
cap - The initial capacity to reserve.public static ScoredId create(long id, double score)
id - The ID.score - The score.public static Function<ScoredId,Long> idFunction()
Function that extracts the ID from a scored ID.public static Ordering<ScoredId> idOrder()
ScoredIds by score.public static Ordering<ScoredId> scoreOrder()
ScoredIds by score.public static Ordering<ScoredId> channelOrder(Symbol chan)
chan - The channel to sort by.public static <T extends Comparable<? super T>> Ordering<ScoredId> channelOrder(TypedSymbol<T> chan)
channelOrder(TypedSymbol, Comparator) with a comparator of
Ordering.natural().nullsFirst().chan - The channel to sort by.channelOrder(TypedSymbol, Comparator)public static <T> Ordering<ScoredId> channelOrder(TypedSymbol<T> chan, Comparator<? super T> order)
null channel values, so their ordering is controlled by
the order's null treatment.chan - The channel to sort by.order - The ordering to use.public static FastCollection<ScoredId> collectionFromVector(SparseVector vector)
FastCollection of ScoredId objects.