From b086f57f56bf0eb9dab9cf321a0f69aaaae84347 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 30 May 2012 08:37:45 +0200 Subject: Initial Maven Conversion --- source/com/c2kernel/lifecycle/LoopDef.java | 78 ------------------------------ 1 file changed, 78 deletions(-) delete mode 100644 source/com/c2kernel/lifecycle/LoopDef.java (limited to 'source/com/c2kernel/lifecycle/LoopDef.java') diff --git a/source/com/c2kernel/lifecycle/LoopDef.java b/source/com/c2kernel/lifecycle/LoopDef.java deleted file mode 100644 index 36108ad..0000000 --- a/source/com/c2kernel/lifecycle/LoopDef.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.c2kernel.lifecycle; - -import com.c2kernel.graph.model.Vertex; -import com.c2kernel.graph.traversal.GraphTraversal; -import com.c2kernel.lifecycle.instance.Loop; -import com.c2kernel.lifecycle.instance.WfVertex; - -/** - * @version $Revision: 1.19 $ $Date: 2005/09/29 10:18:31 $ - * @author $Author: abranson $ - */ - -public class LoopDef extends XOrSplitDef -{ - public boolean hasLoop = false; - public int isNext = 0; - - /** - * @see java.lang.Object#Object() - */ - public LoopDef() - { - super(); - } - - /** - * @see com.c2kernel.lifecycle.WfVertexDef#loop() - */ - @Override - public boolean loop() - { - return true; - } - - /** - * @see com.c2kernel.lifecycle.WfVertexDef#verify() - */ - @Override - public boolean verify() - { - if (!super.verify()) return false; - Vertex[] nexts = getOutGraphables(); - Vertex[] anteVertices = - GraphTraversal.getTraversal(this.getParent().getChildrenGraphModel(), this, GraphTraversal.kUp, false); - int k = 0; - int l = 0; - Vertex[] brothers = getParent().getChildren(); - for (Vertex brother : brothers) - if (brother instanceof LoopDef) l++; - for (Vertex next : nexts) - for (Vertex anteVertice : anteVertices) - if (next.equals(anteVertice)) - k++; - if (k != 1 && !(l>1)) - { - mErrors.add("bad number of pointing back nexts"); - return false; - } -// if (nexts.length>2) { -// mErrors.add("you must only have 2 nexts"); -// return false; -// } - return true; - } - - @Override - public boolean isLoop() { - return true; - } - - @Override - public WfVertex instantiate() { - Loop newLoop = new Loop(); - configureInstance(newLoop); - return newLoop; - } - -} -- cgit v1.2.3