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... args)
转为二维字节数组
|
static byte[][] |
toByteArray(org.springframework.data.redis.serializer.RedisSerializer serializer,
String[] args2,
String... args1)
转为二维字节数组
|
static byte[] |
toBytes(org.springframework.data.redis.serializer.RedisSerializer serializer,
Object value)
转为字节数组
|
static <T> Object |
toJavaType(Object t,
Class<T> type)
转为java类型
|
static Object |
toJavaType(org.springframework.data.redis.serializer.RedisSerializer serializer,
Object result)
转为java类型
|
static <T> List<T> |
toList(org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<T>> results) |
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<String,T> |
toMap(List<? extends org.springframework.data.redis.connection.stream.Record<String,T>> list,
StreamHandler.StreamDataType type)
将列表转为字典
|
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... args)
serializer
- 序列化器args
- 参数public static byte[][] toByteArray(org.springframework.data.redis.serializer.RedisSerializer serializer, String[] args2, String... args1)
serializer
- 序列化器args2
- 参数列表2args1
- 参数列表1public 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> List<T> toList(org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<T>> results)
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 <T> Map<String,T> toMap(List<? extends org.springframework.data.redis.connection.stream.Record<String,T>> list, StreamHandler.StreamDataType type)
list
- 列表type
- 数据类型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
- 字节数组public static <T> Object toJavaType(Object t, Class<T> type)
T
- 返回类型t
- 对象type
- 返回类型Copyright © 2019. All rights reserved.