public static class RedisZSetCommands.Weights extends Object
| Modifier and Type | Method and Description |
|---|---|
RedisZSetCommands.Weights |
apply(Function<Double,Double> operator)
Creates a new
RedisZSetCommands.Weights object that contains all weights with Function applied. |
boolean |
equals(Object o) |
static RedisZSetCommands.Weights |
fromSetCount(int count)
Creates equal
RedisZSetCommands.Weights for a number of input sets count with a weight of one. |
double |
getWeight(int index)
Retrieve the weight at
index. |
int |
hashCode() |
RedisZSetCommands.Weights |
multiply(double multiplier)
Creates a new
RedisZSetCommands.Weights object that contains all weights multiplied by multiplier |
RedisZSetCommands.Weights |
multiply(int multiplier)
Creates a new
RedisZSetCommands.Weights object that contains all weights multiplied by multiplier |
static RedisZSetCommands.Weights |
of(double... weights)
|
static RedisZSetCommands.Weights |
of(int... weights)
|
int |
size() |
double[] |
toArray() |
List<Double> |
toList() |
public static RedisZSetCommands.Weights of(int... weights)
weights - must not be null.RedisZSetCommands.Weights for weights.public static RedisZSetCommands.Weights of(double... weights)
weights - must not be null.RedisZSetCommands.Weights for weights.public static RedisZSetCommands.Weights fromSetCount(int count)
RedisZSetCommands.Weights for a number of input sets count with a weight of one.count - number of input sets. Must be greater or equal to zero.RedisZSetCommands.Weights for a number of input sets with a weight of one.public RedisZSetCommands.Weights multiply(int multiplier)
RedisZSetCommands.Weights object that contains all weights multiplied by multipliermultiplier - multiplier used to multiply each weight with.RedisZSetCommands.Weights for a number of input sets with a weight of one.public RedisZSetCommands.Weights multiply(double multiplier)
RedisZSetCommands.Weights object that contains all weights multiplied by multipliermultiplier - multiplier used to multiply each weight with.RedisZSetCommands.Weights for a number of input sets with a weight of one.public RedisZSetCommands.Weights apply(Function<Double,Double> operator)
RedisZSetCommands.Weights object that contains all weights with Function applied.operator - operator function.RedisZSetCommands.Weights with DoubleUnaryOperator applied.public double getWeight(int index)
index.index - the weight index.index.IndexOutOfBoundsException - if the index is out of rangepublic int size()
public double[] toArray()
public List<Double> toList()
List containing all of the weights in this list in proper sequence (from first to last
element).Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.