X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FDummyFuture.java;h=f6664ed34de9cac49dca8341aa9d0c6e63dbc9b1;hp=67b5b8c93a0aaa2994b5c640df52c3bc48bce4d9;hb=f3ba8a814797fb5d50e24e3f9144f01406121464;hpb=6fd408a04fe4a3611843e2246ece6d7c34b76903 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/DummyFuture.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/DummyFuture.java index 67b5b8c93a..f6664ed34d 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/DummyFuture.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/DummyFuture.java @@ -13,26 +13,26 @@ import org.opendaylight.controller.md.sal.common.api.TransactionStatus; import org.opendaylight.yangtools.yang.common.RpcResult; public class DummyFuture implements Future> { - + private final boolean cancel; private final boolean isCancelled; private final boolean isDone; private final RpcResult result; - + public DummyFuture() { cancel = false; isCancelled = false; isDone = false; result = null; } - + private DummyFuture(Builder builder) { cancel = builder.cancel; isCancelled = builder.isCancelled; isDone = builder.isDone; result = builder.result; } - + public static Builder builder() { return new DummyFuture.Builder(); } @@ -62,9 +62,9 @@ public class DummyFuture implements Future> { ExecutionException, TimeoutException { return result; } - + public static class Builder { - + private boolean cancel; private boolean isCancelled; private boolean isDone; @@ -74,22 +74,22 @@ public class DummyFuture implements Future> { this.cancel = cancel; return this; } - + public Builder isCancelled(boolean isCancelled) { this.isCancelled = isCancelled; return this; } - + public Builder isDone(boolean isDone) { this.isDone = isDone; return this; } - + public Builder rpcResult(RpcResult result) { this.result = result; return this; } - + public Future> build() { return new DummyFuture(this); }