クラス Weights
java.lang.ObjectSE
org.springframework.data.redis.connection.zset.Weights
ソートされた各入力セットの乗算係数をカプセル化する値オブジェクト。これは、すべての入力ソートセットのすべての要素のスコアが、集計関数に渡される前にこの係数で乗算されることを意味します。
- 導入:
- 2.1
- 作成者:
- Mark Paluch, Christoph Strobl
方法の概要
修飾子と型メソッド説明apply(FunctionSE<DoubleSE, DoubleSE> operator) FunctionSE が適用されたすべての重みを含む新しいWeightsオブジェクトを作成します。booleanstatic WeightsfromSetCount(int count) 重みが 1 の入力セットcountの数に対して等しいWeightsを作成します。doublegetWeight(int index) indexで重みを取得します。inthashCode()multiply(double multiplier) すべての重みにmultiplierを掛けたものを含む新しいWeightsオブジェクトを作成しますmultiply(int multiplier) すべての重みにmultiplierを掛けたものを含む新しいWeightsオブジェクトを作成しますstatic Weightsof(double... weights) static Weightsof(int... weights) intsize()double[]toArray()toList()
メソッドの詳細
of
of
fromSetCount
multiply
multiply
apply
FunctionSE が適用されたすべての重みを含む新しいWeightsオブジェクトを作成します。- パラメーター:
operator- 演算子関数。- 戻り値:
DoubleUnaryOperatorSE が適用された新しいWeights
getWeight
public double getWeight(int index) indexで重みを取得します。- パラメーター:
index- ウェイトインデックス。- 戻り値:
indexでの重量。- 例外:
IndexOutOfBoundsExceptionSE- インデックスが範囲外の場合
size
public int size()- 戻り値:
- 重みの数。
toArray
public double[] toArray()- 戻り値:
- このリストのすべての重みを適切な順序で(最初の要素から最後の要素まで)含む配列。
toList
equals
hashCode