@Deprecated public interface ScoredId
A numerical ID associated with a score and optional side channels. A ScoredId
object is intended to be immutable. Scored IDs can be created by using the builder or accumulated in a PackedScoredIdList
.
In addition to the score, a scored id associates channels with the id. Channels are identified by TypedSymbol
s. As an optimization, channels of type double
can be accessed in unboxed fashion using an untyped Symbol
.
A channel, if it is present, cannot contain null
.
Modifier and Type | Method and Description |
---|---|
Collection<SymbolValue<?>> |
getChannels()
Deprecated.
Get the channels associated with a scored ID.
|
Set<TypedSymbol<?>> |
getChannelSymbols()
Deprecated.
Determine the typed symbols associated with all side channels of a
ScoredId . |
<T> T |
getChannelValue(TypedSymbol<T> sym)
Deprecated.
Get the value for a channel.
|
long |
getId()
Deprecated.
Retrieve the numerical identifier of this
ScoredId . |
double |
getScore()
Deprecated.
Retrieve the score of this
ScoredId . |
Collection<DoubleSymbolValue> |
getUnboxedChannels()
Deprecated.
Get the unboxed channels associated with a scored ID.
|
Set<Symbol> |
getUnboxedChannelSymbols()
Deprecated.
Determine the symbols associated with all unboxed double side channels of a
ScoredId . |
double |
getUnboxedChannelValue(Symbol sym)
Deprecated.
Get the unboxed value for a channel.
|
boolean |
hasChannel(TypedSymbol<?> s)
Deprecated.
Determine if a
ScoredId has a specific typed channel. |
boolean |
hasUnboxedChannel(Symbol s)
Deprecated.
Determine if a
ScoredId has a specific channel. |
long getId()
Retrieve the numerical identifier of this ScoredId
.
double getScore()
Retrieve the score of this ScoredId
.
@Nonnull Set<Symbol> getUnboxedChannelSymbols()
Determine the symbols associated with all unboxed double side channels of a ScoredId
.
Symbol
objects, each of which maps to a value in one of the ScoredId
’s unboxed double side channels.@Nonnull Set<TypedSymbol<?>> getChannelSymbols()
Determine the typed symbols associated with all side channels of a ScoredId
.
TypedSymbol
objects, each of which maps to a value in one of the ScoredId
’s side channels.@Nonnull Collection<SymbolValue<?>> getChannels()
Get the channels associated with a scored ID.
@Nonnull Collection<DoubleSymbolValue> getUnboxedChannels()
Get the unboxed channels associated with a scored ID.
@Nullable <T> T getChannelValue(@Nonnull TypedSymbol<T> sym)
Get the value for a channel.
sym
- The channel symbol.T
- The type contained.null
if no such channel is present.double getUnboxedChannelValue(Symbol sym)
Get the unboxed value for a channel. The channel must exist.
sym
- The channel symbol.NullPointerException
- if the symbol names a nonexistent channel.boolean hasUnboxedChannel(Symbol s)
Determine if a ScoredId
has a specific channel.
s
- The side channel’s symbol.true
if the ScoredId
has a channel associated with this symbol, false
otherwise.boolean hasChannel(TypedSymbol<?> s)
Determine if a ScoredId
has a specific typed channel.
s
- The typed side channel’s symbol.true
if the ScoredId
has a channel associated with this symbol, false
otherwise.