### string <--> int
```
Integer.parseInt(str);
```
### string <--> time
```
// time to String
String myString = DateFormat.getDateTimeInstance().format(date);
// String to time
Date myString1 = DateFormat.getDateTimeInstance().parse(time);
```
### long -> string
```
Long.toString(a3)
```
### long -> date
```
new Date(outDate)
```
### long <--> int
```
ToLongUtils.long2int(couponTemplateId)
int a = Math.toIntExact(long)
把long转化为int,超过范围则抛异常
Ints.checkedCast()
// Integer -> long
Long b = a.longValue();
```
---
### List -> set
```
new HashSet<>(arraylist)
```
### map -> list
```
collection.stream().map(mapper).collect(Collectors.toList());
````
---
### 一个数 -> SET
```
Collections.singleton(一个数)
```
### 一个数 -> List
```
List<Integer> userIds = Lists.newArrayList(userId);
```