public class ConvertUtil extends Object
Constructor and Description |
---|
ConvertUtil() |
Modifier and Type | Method and Description |
---|---|
static <K> byte[][] |
toByteArray(org.springframework.data.redis.serializer.RedisSerializer keySerializer,
org.springframework.data.redis.serializer.RedisSerializer argsSerializer,
List<K> keys,
Object[] args)
转为二维字节数组
|
static byte[][] |
toByteArray(org.springframework.data.redis.serializer.RedisSerializer serializer,
String... keys)
转为二维字节数组
|
static byte[] |
toBytes(org.springframework.data.redis.serializer.RedisSerializer serializer,
Object value)
转为字节数组
|
static <T> Map<T,org.springframework.data.geo.Point> |
toMap(org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<T>> results)
转换为字典
|
static <T> Map<Double,T> |
toMap(Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<T>> set)
将TypedTuple类型的集合转为字典
|
static <T> Map<Double,T> |
toMap(T... values)
将对象转为字典
|
static String |
toStr(org.springframework.data.redis.serializer.RedisSerializer serializer,
byte[] bytes)
转为字符串
|
static <T> Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<T>> |
toTypedTupleSet(Map<Double,T> map)
将字典转为TypedTuple类型的集合
|
public static byte[][] toByteArray(org.springframework.data.redis.serializer.RedisSerializer serializer, String... keys)
serializer
- 序列化器keys
- 键public static <K> byte[][] toByteArray(org.springframework.data.redis.serializer.RedisSerializer keySerializer, org.springframework.data.redis.serializer.RedisSerializer argsSerializer, List<K> keys, Object[] args)
K
- 键类型keySerializer
- 键序列化器argsSerializer
- 参数序列化器keys
- 键列表args
- 参数列表public static <T> Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<T>> toTypedTupleSet(Map<Double,T> map)
T
- 对象类型map
- 字典public static <T> Map<T,org.springframework.data.geo.Point> toMap(org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<T>> results)
T
- 类型results
- 结果集public static <T> Map<Double,T> toMap(Set<org.springframework.data.redis.core.ZSetOperations.TypedTuple<T>> set)
T
- 对象类型set
- TypedTuple类型的集合public static <T> Map<Double,T> toMap(T... values)
T
- 对象类型values
- 对象public static byte[] toBytes(org.springframework.data.redis.serializer.RedisSerializer serializer, Object value)
serializer
- 序列化器value
- 值public static String toStr(org.springframework.data.redis.serializer.RedisSerializer serializer, byte[] bytes)
serializer
- 序列化器bytes
- 字节数组Copyright © 2019. All rights reserved.