[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[CASHeW-s-Editor] Duplicate properties...
From: |
Ravish Bhagdev |
Subject: |
[CASHeW-s-Editor] Duplicate properties... |
Date: |
Fri, 25 Feb 2005 11:50:39 -0000 |
Hi,
Roger, we have this is base class Rectangle for example:
protected Point location = new Point(0, 0);
protected String name = "RectangleNode";
private List outputs = new ArrayList(5);
private List inputs = new ArrayList(5);
So we should just change the "name" property in sub class. We don't need two
different copies of this properties in both Rect and Ellipse cause they remain
same. This is duplication of code. We can put these in node base class and
just change name in subclass constructors.
There is also duplication of property maps that we use to name the constants, I
mean the public final static variables should only be in Node class which we
can then use in the subclasses.
- Ravish.