Exemple #1
0
        internal static DictNode dictSearch(Dict dict, System.Object key)
        {
            DictNode node = dict.head;

            do
            {
                node = node.next;
            }while (node.key != null && !(dict.leq.leq(dict.frame, key, node.key)));

            return(node);
        }
Exemple #2
0
        internal static DictNode dictInsertBefore(Dict dict, DictNode node, System.Object key)
        {
            do
            {
                node = node.prev;
            }while (node.key != null && !dict.leq.leq(dict.frame, node.key, key));

            DictNode newNode = new DictNode();

            newNode.key    = key;
            newNode.next   = node.next;
            node.next.prev = newNode;
            newNode.prev   = node;
            node.next      = newNode;

            return(newNode);
        }
Exemple #3
0
 internal static void  dictDelete(Dict dict, DictNode node)
 {
     node.next.prev = node.prev;
     node.prev.next = node.next;
 }
Exemple #4
0
 internal static DictNode dictPred(DictNode aNode)
 {
     return(aNode.prev);
 }
Exemple #5
0
 internal static DictNode dictSucc(DictNode aNode)
 {
     return(aNode.next);
 }
Exemple #6
0
 internal static System.Object dictKey(DictNode aNode)
 {
     return(aNode.key);
 }