Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/port80/graph/impl/GraphElement.java


1   //
2   // Copyright(c) 2002, Chris Leung
3   //
4   
5   package com.port80.graph.impl;
6   
7   import java.util.*;
8   import com.port80.util.*;
9   import com.port80.util.attr.*;
10  import com.port80.graph.*;
11  
12  /** An abstract base class for graph objects (eg. Vertex,Edge,Graph)
13   *
14   *  @see IGraphElement
15   */
16  public abstract class GraphElement extends AttrTable implements IGraphElement {
17  
18    // Static fields ///////////////////////////////////////////////////////
19    //
20  
21    private static final String NAME = "GraphElement";
22    private static final String PACKAGENAME = "com.port80.graph";
23    private static final String CLASSNAME = PACKAGENAME + "." + NAME;
24    private static final int VERSION = 0x0001;
25    private static final String VERSIONNAME = "0.1";
26    private static boolean DEBUG = false;
27  
28    // Constructors ////////////////////////////////////////////////////////
29    //
30    public GraphElement(IAttrTable parentAttrTable) {
31      super(parentAttrTable);
32    }
33  
34    // Instance fields /////////////////////////////////////////////////////
35    //
36  
37    protected String fName = null;
38    protected Object fData = null;
39  
40    // Abstract methods ////////////////////////////////////////////////////
41    //
42  
43    public String getElementTypeName() {
44      return NAME;
45    }
46  
47    // Instance methods ////////////////////////////////////////////////////
48    //
49  
50    public String getName() {
51      return fName;
52    }
53    public Object getData() {
54      return fData;
55    }
56    public void setName(String name) {
57      fName = name;
58    }
59    public void setData(Object a) {
60      fData=a;
61    }
62    
63    ////////////////////////////////////////////////////////////////////////
64  
65  }