📄 identity.java
字号:
//******************************************************************
// Released under the DevelopMentor OpenSource Software License.
// Please consult the LICENSE file in the project root directory,
// or at http://www.develop.com for details before using this
// software.
//******************************************************************
package com.develop.jawin;
public class Identity {
private int count;
private final int peer;
Identity(int peer) {
count = 1;
this.peer = peer;
if (IdentityManager.traceRefs) {
System.out.println("GIT ref [" + Integer.toHexString(peer) + "] = 1");
}
}
synchronized int IncRef() {
if (IdentityManager.traceRefs) {
System.out.println("GIT ref [" + Integer.toHexString(peer) + "] = " + (count+1));
}
return ++count;
}
synchronized int DecRef() {
if (IdentityManager.traceRefs) {
System.out.println("GIT ref [" + Integer.toHexString(peer) + "] = " + (count-1));
}
return --count;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -