Restored old method for int weights for backwards compatibility
This commit is contained in:
@@ -23,7 +23,30 @@ public class ZParams {
|
||||
|
||||
private List<byte[]> params = new ArrayList<byte[]>();
|
||||
|
||||
public ZParams weights(final double... weights) {
|
||||
/**
|
||||
* Set weights.
|
||||
*
|
||||
* @param weights
|
||||
* weights.
|
||||
* @deprecated Use {@link #weightsByDouble(double...)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public ZParams weights(final int... weights) {
|
||||
params.add(WEIGHTS.raw);
|
||||
for (final int weight : weights) {
|
||||
params.add(Protocol.toByteArray(weight));
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set weights.
|
||||
*
|
||||
* @param weights
|
||||
* weights.
|
||||
*/
|
||||
public ZParams weightsByDouble(final double... weights) {
|
||||
params.add(WEIGHTS.raw);
|
||||
for (final double weight : weights) {
|
||||
params.add(Protocol.toByteArray(weight));
|
||||
|
||||
Reference in New Issue
Block a user