|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.buffalo.fs7.qsymbol2.NameStripper
this class is a helper class to translate the naming convention of the Gate variables into a nested structure of GateContainers. For example a gate named topgroup.group.gate will translate into three gate containers named gate, nested into the one named group, nested into the one called topgroup. In order to facilitate grouping and ungrouping this class tokenizes the name of a variable and strips away for example the leading (toplevel) part.
GateContainer,
Gate| Field Summary | |
protected java.util.Vector |
tokens
holds the parts of the name |
| Constructor Summary | |
NameStripper(java.lang.String name)
create a NameStripper object for a given string. |
|
| Method Summary | |
java.lang.String |
getFullName()
returns the full name |
java.lang.String |
getGroup(int i)
returns a specified part of the name. 0 is the top level. |
int |
getGroupCount()
counts the number of group levels. |
java.util.Enumeration |
getGroups()
returns the parts of the name in order from top level to lowest level |
java.lang.String |
getName()
returns the lowest order name |
void |
removeGroup(int i)
removes a certain part of the name. 0 is the top level. |
void |
stripLeadingGroup()
removes the top level group name |
java.lang.String |
toString()
outputs all groups separated by tabs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Vector tokens
| Constructor Detail |
public NameStripper(java.lang.String name)
| Method Detail |
public void stripLeadingGroup()
public java.lang.String getFullName()
public java.lang.String getName()
public int getGroupCount()
public java.lang.String getGroup(int i)
public java.util.Enumeration getGroups()
public void removeGroup(int i)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||