com.aliyun.tair.tairbloom.factory.BloomBuilderFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alibabacloud-tairjedis-sdk Show documentation
Show all versions of alibabacloud-tairjedis-sdk Show documentation
Aliyun Tair Redis client for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
package com.aliyun.tair.tairbloom.factory;
import redis.clients.jedis.Builder;
import java.util.List;
public class BloomBuilderFactory {
public static final Builder BFMADD_RESULT_BOOLEAN_LIST = new Builder() {
@Override
public Boolean[] build(Object data) {
if (data == null) {
return null;
}
List l = (List) data;
Boolean ret[] = new Boolean[l.size()];
for (int i = 0; i < l.size(); i++) {
ret[i] = ((Number) l.get(i)).longValue() != 0;
}
return ret;
}
@Override
public String toString() {
return "BfmaddResult";
}
};
public static final Builder BFINSERT_RESULT_BOOLEAN_LIST = new Builder() {
@Override
public Boolean[] build(Object data) {
if (data == null) {
return null;
}
List l = (List) data;
Boolean ret[] = new Boolean[l.size()];
for (int i = 0; i < l.size(); i++) {
ret[i] = ((Number) l.get(i)).longValue() != 0;
}
return ret;
}
@Override
public String toString() {
return "BfinsertResult";
}
};
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy