diff options
Diffstat (limited to 'source/com/c2kernel/graph/model/GraphableEdge.java')
| -rwxr-xr-x | source/com/c2kernel/graph/model/GraphableEdge.java | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/source/com/c2kernel/graph/model/GraphableEdge.java b/source/com/c2kernel/graph/model/GraphableEdge.java new file mode 100755 index 0000000..a6d9a63 --- /dev/null +++ b/source/com/c2kernel/graph/model/GraphableEdge.java @@ -0,0 +1,71 @@ +package com.c2kernel.graph.model;
+
+import com.c2kernel.utils.CastorHashMap;
+import com.c2kernel.utils.KeyValuePair;
+
+/**
+* @version $Revision: 1.2 $ $Date: 2003/05/12 13:10:20 $
+* @author $Author: abranson $
+*/
+public abstract class GraphableEdge extends DirectedEdge
+{
+
+ private GraphableVertex mParent;
+ private CastorHashMap mProperties = null;
+
+ public GraphableEdge()
+ {
+ mProperties = new CastorHashMap();
+ }
+
+ public GraphableEdge(GraphableVertex pre, GraphableVertex nex)
+ {
+ mProperties = new CastorHashMap();
+ setParent(pre.getParent());
+ pre.getParent().getChildrenGraphModel().addEdgeAndCreateId(this, pre, nex);
+ }
+
+ /**
+ * Returns the parent.
+ * @return GraphableVertex
+ */
+ public GraphableVertex getParent()
+ {
+ return mParent;
+ }
+
+ /**
+ * Sets the parent.
+ * @param parent The parent to set
+ */
+ public void setParent(GraphableVertex parent)
+ {
+ mParent = parent;
+ }
+
+ /**
+ * Returns the properties.
+ * @return CastorHashMap
+ */
+ public CastorHashMap getProperties()
+ {
+ return mProperties;
+ }
+
+ /**
+ * Sets the properties.
+ * @param properties The properties to set
+ */
+ public void setProperties(CastorHashMap properties)
+ {
+ mProperties = properties;
+ }
+
+ public KeyValuePair[] getKeyValuePairs() {
+ return mProperties.getKeyValuePairs();
+ }
+
+ public void setKeyValuePairs(KeyValuePair[] pairs) {
+ mProperties.setKeyValuePairs(pairs);
+ }
+}
|
