AAI-1523 Batch reformat aai-core
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / serialization / tinkerpop / TreeBackedEdge.java
index 09abfb1..50174d0 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
+
 package org.onap.aai.serialization.tinkerpop;
 
+import java.util.Iterator;
+
 import org.apache.tinkerpop.gremlin.structure.Direction;
 import org.apache.tinkerpop.gremlin.structure.Edge;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -26,54 +29,49 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdge;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
-import java.util.Iterator;
-
-
 /**
- * Represents a {@link Edge} that is disconnected from a {@link Graph} however, 
+ * Represents a {@link Edge} that is disconnected from a {@link Graph} however,
  * traversals are supported as they are backed by a Tree with saturated {@link Vertex} and {@link Edge} objects.
  * These objects are not mutable and can only be used to read information out.
  *
  */
 public class TreeBackedEdge extends DetachedEdge implements Edge {
 
-       private static final long serialVersionUID = 5419650145562077538L;
-       private TreeBackedVertex inVertex;
-       private TreeBackedVertex outVertex;
-       public TreeBackedEdge(Edge edge, TreeBackedVertex inVertex, TreeBackedVertex outVertex) {
-               super(edge, true);
-               this.inVertex = inVertex;
-               this.outVertex = outVertex;
-       }
-       
-       @Override
-       public Vertex inVertex() {
-               return this.inVertex;
-       }
-       
-       @Override
-       public Vertex outVertex() {
-               return this.outVertex;
-       }
-       
-       @Override
-       public Iterator<Vertex> bothVertices() {
-               return this.vertices(Direction.BOTH);
-       }
-       
-       @Override
-       public Iterator<Vertex> vertices(Direction direction) {
-                switch (direction) {
-         case OUT:
-             return IteratorUtils.of(this.outVertex);
-         case IN:
-             return IteratorUtils.of(this.inVertex);
-         default:
-             return IteratorUtils.of(this.outVertex, this.inVertex);
-     }
-       }
+    private static final long serialVersionUID = 5419650145562077538L;
+    private TreeBackedVertex inVertex;
+    private TreeBackedVertex outVertex;
+
+    public TreeBackedEdge(Edge edge, TreeBackedVertex inVertex, TreeBackedVertex outVertex) {
+        super(edge, true);
+        this.inVertex = inVertex;
+        this.outVertex = outVertex;
+    }
+
+    @Override
+    public Vertex inVertex() {
+        return this.inVertex;
+    }
+
+    @Override
+    public Vertex outVertex() {
+        return this.outVertex;
+    }
 
+    @Override
+    public Iterator<Vertex> bothVertices() {
+        return this.vertices(Direction.BOTH);
+    }
 
-       
+    @Override
+    public Iterator<Vertex> vertices(Direction direction) {
+        switch (direction) {
+            case OUT:
+                return IteratorUtils.of(this.outVertex);
+            case IN:
+                return IteratorUtils.of(this.inVertex);
+            default:
+                return IteratorUtils.of(this.outVertex, this.inVertex);
+        }
+    }
 
 }