mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
57 lines
1.0 KiB
Java
57 lines
1.0 KiB
Java
|
|
import java.util.Vector;
|
|
|
|
class ControlNodeGroup {
|
|
|
|
ControlNodeGroup(ControlNode aHead)
|
|
{
|
|
head = aHead;
|
|
tails = new Vector();
|
|
}
|
|
|
|
void fixTails(ControlNode butt)
|
|
{
|
|
int count = tails.size();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
ControlNode aNode = (ControlNode)(tails.elementAt(i));
|
|
aNode.setNext(butt);
|
|
}
|
|
tails.removeAllElements();
|
|
}
|
|
|
|
void setHead(ControlNode aHead)
|
|
{
|
|
head = aHead;
|
|
}
|
|
|
|
ControlNode getHead()
|
|
{
|
|
return head;
|
|
}
|
|
|
|
void addTail(ControlNode aTail)
|
|
{
|
|
tails.addElement(aTail);
|
|
}
|
|
|
|
void removeTail(ControlNode aTail)
|
|
{
|
|
tails.removeElement(aTail);
|
|
}
|
|
|
|
void addTails(ControlNodeGroup aGroup)
|
|
{
|
|
int count = aGroup.tails.size();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
tails.addElement(aGroup.tails.elementAt(i));
|
|
}
|
|
aGroup.tails.removeAllElements();
|
|
}
|
|
|
|
|
|
ControlNode head;
|
|
Vector tails;
|
|
|
|
} |