提交 14967e49 编写于 作者: P peng-yongsheng

Fixed maven package error from style check.

上级 eaa02545
...@@ -23,14 +23,14 @@ import java.util.concurrent.atomic.AtomicInteger; ...@@ -23,14 +23,14 @@ import java.util.concurrent.atomic.AtomicInteger;
/** /**
* @author peng-yongsheng * @author peng-yongsheng
*/ */
public abstract class Window<WindowCollection extends Collection> { public abstract class Window<WINDOW_COLLECTION extends Collection> {
private AtomicInteger windowSwitch = new AtomicInteger(0); private AtomicInteger windowSwitch = new AtomicInteger(0);
private WindowCollection pointer; private WINDOW_COLLECTION pointer;
private WindowCollection windowDataA; private WINDOW_COLLECTION windowDataA;
private WindowCollection windowDataB; private WINDOW_COLLECTION windowDataB;
protected Window() { protected Window() {
this.windowDataA = collectionInstance(); this.windowDataA = collectionInstance();
...@@ -38,7 +38,7 @@ public abstract class Window<WindowCollection extends Collection> { ...@@ -38,7 +38,7 @@ public abstract class Window<WindowCollection extends Collection> {
this.pointer = windowDataA; this.pointer = windowDataA;
} }
public abstract WindowCollection collectionInstance(); public abstract WINDOW_COLLECTION collectionInstance();
public boolean trySwitchPointer() { public boolean trySwitchPointer() {
return windowSwitch.incrementAndGet() == 1 && !getLast().isReading(); return windowSwitch.incrementAndGet() == 1 && !getLast().isReading();
...@@ -57,7 +57,7 @@ public abstract class Window<WindowCollection extends Collection> { ...@@ -57,7 +57,7 @@ public abstract class Window<WindowCollection extends Collection> {
getLast().reading(); getLast().reading();
} }
protected WindowCollection getCurrentAndWriting() { protected WINDOW_COLLECTION getCurrentAndWriting() {
if (pointer == windowDataA) { if (pointer == windowDataA) {
windowDataA.writing(); windowDataA.writing();
return windowDataA; return windowDataA;
...@@ -67,11 +67,11 @@ public abstract class Window<WindowCollection extends Collection> { ...@@ -67,11 +67,11 @@ public abstract class Window<WindowCollection extends Collection> {
} }
} }
protected WindowCollection getCurrent() { protected WINDOW_COLLECTION getCurrent() {
return pointer; return pointer;
} }
public WindowCollection getLast() { public WINDOW_COLLECTION getLast() {
if (pointer == windowDataA) { if (pointer == windowDataA) {
return windowDataB; return windowDataB;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册