1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| package com.estate.expert.admin.utils;
|
| /**
| * 删除对象工具
| * 辅助显示删除对象的名称
| */
| public class DeletedObjectUtil {
|
| /**
| * 将对象名称转换为删除对象
| * @param name 对象名称
| * @return 删除对象
| */
| public static String toDeletedString(String name) {
| return String.format("%s - @@%d@@", name, System.currentTimeMillis());
| }
|
| /**
| * 美化删除对象的名称
| * @param name 对象名称
| * @return 美化后的名称
| */
| public static String beautifyDeletedString(String name) {
| if(name == null)
| return "";
| return name.replaceAll(" - @@\\d+@@", "(已删除)");
| }
| }
|
|