Changeset 43

Show
Ignore:
Timestamp:
02/17/10 17:01:43 (2 years ago)
Author:
ke
Message:

Harmonized the assignment of Kahina object IDs for charts and trees. In both cases, the class directly derived from KahinaObject? now assigns IDs to newly created objects. This is for convenience and has the side effect that all charts share a common ID space now, and so do all trees.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • kahina/trunk/src/org/kahina/data/chart/KahinaChart.java

    r42 r43  
    77public abstract class KahinaChart extends KahinaObject 
    88{ 
    9         static int lastID = 0; 
     9        private static int nextID = 0; 
    1010 
    1111        public KahinaChart() 
    1212        { 
    13                 super(lastID++); 
     13                super(nextID++); 
    1414        } 
    1515 
  • kahina/trunk/src/org/kahina/data/tree/KahinaMemTree.java

    r42 r43  
    1515 
    1616public class KahinaMemTree extends KahinaTree 
    17 
    18     static int lastID = 0; 
    19      
     17{     
    2018    //empty tree has rootID = -1 
    2119    protected int rootID = -1; 
     
    3735     
    3836    public KahinaMemTree() 
    39     { 
    40         super(lastID++); 
    41          
     37    {         
    4238        rootID = -1; 
    4339         
  • kahina/trunk/src/org/kahina/data/tree/KahinaTree.java

    r42 r43  
    88public abstract class KahinaTree extends KahinaObject 
    99{ 
     10        private static int nextID = 0; 
    1011 
    11         public KahinaTree(int id
     12        public KahinaTree(
    1213        { 
    13                 super(id); 
     14                super(nextID++); 
    1415        } 
    1516