Exemple #1
0
        public void replaceSublistWith(Node startNode, Node endNode, ProseList newSublist)
        {
            ProseList.Node lowBound = startNode.prev;
            ProseList.Node highBound = endNode.next;

            if (lowBound == null)
            {
                newSublist.root.prev = null;
            }
            else
            {
                lowBound.next = newSublist.root;
                newSublist.root.prev = lowBound;
            }

            ProseList.Node lastSublistNode = newSublist.LastNode;
            if (highBound == null)
            {
                lastSublistNode.next = null;
            }
            else
            {
                lastSublistNode.next = highBound;
                highBound.prev = lastSublistNode;
            }
        }
Exemple #2
0
        public void replaceSublistWith(Node startNode, Node endNode, ProseList newSublist)
        {
            ProseList.Node lowBound  = startNode.prev;
            ProseList.Node highBound = endNode.next;

            if (lowBound == null)
            {
                newSublist.root.prev = null;
            }
            else
            {
                lowBound.next        = newSublist.root;
                newSublist.root.prev = lowBound;
            }

            ProseList.Node lastSublistNode = newSublist.LastNode;
            if (highBound == null)
            {
                lastSublistNode.next = null;
            }
            else
            {
                lastSublistNode.next = highBound;
                highBound.prev       = lastSublistNode;
            }
        }
Exemple #3
0
 public MutableProseList(ProseList list, int length)
     : base(list, length)
 {
 }
Exemple #4
0
 public MutableProseList(ProseList list, int length) : base(list, length)
 {
 }