예제 #1
0
        public static void InsertHeadList <T>(LinkedListEntry <T> listHead, LinkedListEntry <T> entry)
        {
            LinkedListEntry <T> flink;

            flink          = listHead.Flink;
            entry.Flink    = flink;
            entry.Blink    = listHead;
            flink.Blink    = entry;
            listHead.Flink = entry;
        }
예제 #2
0
        public static void InsertTailList <T>(LinkedListEntry <T> listHead, LinkedListEntry <T> entry)
        {
            LinkedListEntry <T> blink;

            blink          = listHead.Blink;
            entry.Flink    = listHead;
            entry.Blink    = blink;
            blink.Flink    = entry;
            listHead.Blink = entry;
        }
예제 #3
0
        public static LinkedListEntry <T> RemoveTailList <T>(LinkedListEntry <T> listHead)
        {
            LinkedListEntry <T> blink;
            LinkedListEntry <T> entry;

            entry          = listHead.Blink;
            blink          = entry.Blink;
            listHead.Blink = blink;
            blink.Flink    = listHead;

            return(entry);
        }
예제 #4
0
        public static LinkedListEntry <T> RemoveHeadList <T>(LinkedListEntry <T> listHead)
        {
            LinkedListEntry <T> flink;
            LinkedListEntry <T> entry;

            entry          = listHead.Flink;
            flink          = entry.Flink;
            listHead.Flink = flink;
            flink.Blink    = listHead;

            return(entry);
        }
예제 #5
0
        public static bool RemoveEntryList <T>(LinkedListEntry <T> entry)
        {
            LinkedListEntry <T> blink;
            LinkedListEntry <T> flink;

            flink       = entry.Flink;
            blink       = entry.Blink;
            blink.Flink = flink;
            flink.Blink = blink;

            return(flink == blink);
        }
예제 #6
0
 public static void InitializeListHead <T>(LinkedListEntry <T> listHead)
 {
     listHead.Flink = listHead.Blink = listHead;
 }