summaryrefslogtreecommitdiff
path: root/same
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-02-27 16:16:27 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-02-27 16:16:27 +0100
commit145b1bd126603219dfe50b739dd3a019b43e5972 (patch)
tree5693260c25a97b9a6bf82f9b7b9854e01cdf7e4d /same
parent4d3eea4a5a72b350ccc0170e054b9c3a0823eef1 (diff)
Remove argument to DelayedOperation.working-graphics-0.1
Diffstat (limited to 'same')
-rw-r--r--same/src/main/java/com/orbekk/util/DelayedOperation.java6
-rw-r--r--same/src/test/java/com/orbekk/util/DelayedOperationTest.java7
2 files changed, 5 insertions, 8 deletions
diff --git a/same/src/main/java/com/orbekk/util/DelayedOperation.java b/same/src/main/java/com/orbekk/util/DelayedOperation.java
index cf6ca30..21215e7 100644
--- a/same/src/main/java/com/orbekk/util/DelayedOperation.java
+++ b/same/src/main/java/com/orbekk/util/DelayedOperation.java
@@ -1,6 +1,6 @@
package com.orbekk.util;
-public class DelayedOperation<T> {
+public class DelayedOperation {
public static class Status {
public final static int OK = 1;
public final static int CONFLICT = 2;
@@ -53,13 +53,11 @@ public class DelayedOperation<T> {
}
}
- private T argument;
private Status status;
private boolean isDone;
private int identifier;
- public DelayedOperation(T argument) {
- this.argument = argument;
+ public DelayedOperation() {
}
public Status getStatus() {
diff --git a/same/src/test/java/com/orbekk/util/DelayedOperationTest.java b/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
index b15830f..b65ceed 100644
--- a/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
+++ b/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
@@ -6,20 +6,19 @@ import org.junit.Test;
public class DelayedOperationTest {
@Test public void initialOperationStatus() {
- DelayedOperation<String> operation = new DelayedOperation<String>("NotFinished");
+ DelayedOperation operation = new DelayedOperation();
assertFalse(operation.isDone());
}
@Test public void completedOperationReturns() {
- DelayedOperation<String> operation = new DelayedOperation<String>("Test");
+ DelayedOperation operation = new DelayedOperation();
operation.complete(DelayedOperation.Status.createOk());
assertTrue(operation.isDone());
assertEquals(DelayedOperation.Status.createOk(), operation.getStatus());
}
@Test public void concurrentTest() throws Exception {
- final DelayedOperation<String> operation =
- new DelayedOperation<String>("ConcurrentTest");
+ final DelayedOperation operation = new DelayedOperation();
Thread t = new Thread(new Runnable() {
@Override