@Override
public String toString(){
return Objects.toStringHelper(this)
.add("the entityId", entityId)
.add("", name)
.add("", resId)
.add("", relationId).toString();
}
public static void main(String args[]){
DataBlock da = new DataBlock();
da.setEntityId("data_block$");
da.setName("data_block");
System.out.println(da.toString());
}
运行结果
DataBlock{the entityId=data_block$, =data_block, =0, =0}
Stopwatch sw = new Stopwatch();
sw.start();
。。。。。。。。。。。
sw.stop();
System.out.println(sw.elapsedMillis());
System.out.println(sw.elapsedTime(TimeUnit.NANOSECONDS));
运行结果
2
2203877