BUG-272: cleanup sal-rest-connector
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / java / org / opendaylight / controller / sal / restconf / impl / test / DummyFuture.java
index 251b212513c80f617740bb6562f1159f43aa6b24..22b34a44203e0ba67384f6635e7b55bb0dc4e2e5 100644 (file)
@@ -1,37 +1,47 @@
+/*
+ * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
 package org.opendaylight.controller.sal.restconf.impl.test;
 
-import java.util.concurrent.*;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
 public class DummyFuture implements Future<RpcResult<TransactionStatus>> {
-    
+
     private final boolean cancel;
     private final boolean isCancelled;
     private final boolean isDone;
     private final RpcResult<TransactionStatus> result;
-    
+
     public DummyFuture() {
         cancel = false;
         isCancelled = false;
         isDone = false;
         result = null;
     }
-    
-    private DummyFuture(Builder builder) {
+
+    private DummyFuture(final Builder builder) {
         cancel = builder.cancel;
         isCancelled = builder.isCancelled;
         isDone = builder.isDone;
         result = builder.result;
     }
-    
+
     public static Builder builder() {
         return new DummyFuture.Builder();
     }
 
     @Override
-    public boolean cancel(boolean mayInterruptIfRunning) {
+    public boolean cancel(final boolean mayInterruptIfRunning) {
         return cancel;
     }
 
@@ -51,40 +61,40 @@ public class DummyFuture implements Future<RpcResult<TransactionStatus>> {
     }
 
     @Override
-    public RpcResult<TransactionStatus> get(long timeout, TimeUnit unit) throws InterruptedException,
-            ExecutionException, TimeoutException {
+    public RpcResult<TransactionStatus> get(final long timeout, final TimeUnit unit) throws InterruptedException,
+    ExecutionException, TimeoutException {
         return result;
     }
-    
+
     public static class Builder {
-        
+
         private boolean cancel;
         private boolean isCancelled;
         private boolean isDone;
         private RpcResult<TransactionStatus> result;
 
-        public Builder cancel(boolean cancel) {
+        public Builder cancel(final boolean cancel) {
             this.cancel = cancel;
             return this;
         }
-        
-        public Builder isCancelled(boolean isCancelled) {
+
+        public Builder isCancelled(final boolean isCancelled) {
             this.isCancelled = isCancelled;
             return this;
         }
-        
-        public Builder isDone(boolean isDone) {
+
+        public Builder isDone(final boolean isDone) {
             this.isDone = isDone;
             return this;
         }
-        
-        public Builder rpcResult(RpcResult<TransactionStatus> result) {
+
+        public Builder rpcResult(final RpcResult<TransactionStatus> result) {
             this.result = result;
             return this;
         }
-        
+
         public Future<RpcResult<TransactionStatus>> build() {
             return new DummyFuture(this);
         }
     }
-}
\ No newline at end of file
+}