亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? linkedlist.java

?? Jvie論壇的程序
?? JAVA
字號:
/**
 * $RCSfile: LinkedList.java,v $
 * $Revision: 1.2 $
 * $Date: 2000/12/21 17:47:20 $
 *
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.Yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@Yasna.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.Yasna.com>.
 */

package com.Yasna.util;

import java.util.*;

/**
 * Simple LinkedList implementation. The main feature is that list nodes
 * are public, which allows very fast delete operations (when one has a
 * reference to the node that is to be deleted).<p>
 *
 * The linked list implementation was specifically written for the CoolServlets
 * cache system. While it can be used as a general purpose linked list, for
 * most applications, it is more suitable to use the linked list that is part
 * of the Java Collections package.
 */
public class LinkedList {

    /**
     * The root of the list keeps a reference to both the first and last
     * elements of the list.
     */
    private LinkedListNode head = new LinkedListNode("head", null, null);

    /**
     * Creates a new linked list.
     */
    public LinkedList() {
        head.next = head.previous = head;
    }

    /**
     * Returns the first linked list node in the list.
     *
     * @return the first element of the list.
     */
    public LinkedListNode getFirst() {
        LinkedListNode node = head.next;
        if (node == head) {
            return null;
        }
        return node;
    }

    /**
     * Returns the last linked list node in the list.
     *
     * @return the last element of the list.
     */
    public LinkedListNode getLast() {
        LinkedListNode node = head.previous;
        if (node == head) {
            return null;
        }
        return node;
    }

    /**
     * Adds a node to the beginning of the list.
     *
     * @param node the node to add to the beginning of the list.
     */
    public LinkedListNode addFirst(LinkedListNode node) {
        node.next = head.next;
        node.previous = head;
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Adds an object to the beginning of the list by automatically creating a
     * a new node and adding it to the beginning of the list.
     *
     * @param object the object to add to the beginning of the list.
     * @return the node created to wrap the object.
     */
    public LinkedListNode addFirst(Object object) {
        LinkedListNode node = new LinkedListNode(object, head.next, head);
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Adds an object to the end of the list by automatically creating a
     * a new node and adding it to the end of the list.
     *
     * @param object the object to add to the end of the list.
     * @return the node created to wrap the object.
     */
    public LinkedListNode addLast(Object object) {
        LinkedListNode node = new LinkedListNode(object, head, head.previous);
        node.previous.next = node;
        node.next.previous = node;
        return node;
    }

    /**
     * Erases all elements in the list and re-initializes it.
     */
    public void clear() {
        //Remove all references in the list.
        LinkedListNode node = getLast();
        while (node != null) {
            node.remove();
            node = getLast();
        }

        //Re-initialize.
        head.next = head.previous = head;
    }

    /**
     * Returns a String representation of the linked list with a comma
     * delimited list of all the elements in the list.
     *
     * @return a String representation of the LinkedList.
     */
    public String toString() {
        LinkedListNode node = head.next;
        StringBuffer buf = new StringBuffer();
        while (node != head) {
            buf.append(node.toString()).append(", ");
            node = node.next;
        }
        return buf.toString();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91麻豆精品国产91久久久资源速度| 成人爽a毛片一区二区免费| 欧美日免费三级在线| 一区二区三区高清不卡| 欧美影视一区二区三区| 日韩va欧美va亚洲va久久| 日韩一区二区三区四区| 国产一区二区三区视频在线播放| 欧美国产1区2区| 91黄色免费观看| 日韩不卡一二三区| 国产日韩欧美精品综合| av高清久久久| 婷婷激情综合网| 精品久久久三级丝袜| 国产精品中文字幕日韩精品 | 欧美日韩一二三区| 免费成人av资源网| 中文一区一区三区高中清不卡| 91网站在线观看视频| 婷婷开心激情综合| 中文字幕欧美国产| 欧美精品一卡两卡| 国产高清精品网站| 亚洲线精品一区二区三区 | 精品免费视频一区二区| 成人性生交大合| 亚洲国产另类av| 久久久不卡网国产精品一区| 欧洲视频一区二区| 国产在线不卡一卡二卡三卡四卡| 亚洲日本丝袜连裤袜办公室| 欧美白人最猛性xxxxx69交| 成人午夜视频网站| 日本欧美韩国一区三区| 国产精品国产自产拍在线| 制服丝袜在线91| 成人一级片在线观看| 麻豆一区二区在线| 一区二区三区四区亚洲| 久久久www成人免费毛片麻豆 | 国产成人av资源| 性久久久久久久| 国产精品福利一区二区| 欧美成人性战久久| 欧美日韩三级一区二区| 成人白浆超碰人人人人| 久久se这里有精品| 亚洲一二三区在线观看| 国产日韩欧美一区二区三区乱码 | 色视频一区二区| 99re在线精品| 国产精品无码永久免费888| 欧美喷潮久久久xxxxx| 成人av网站在线观看| 久久99国产精品尤物| 天堂久久久久va久久久久| 国产精品久久久久久久岛一牛影视| 日韩一区二区电影在线| 欧美日韩一区二区三区不卡 | 99久久久国产精品| 国产另类ts人妖一区二区| 欧美aaaaa成人免费观看视频| 亚洲视频小说图片| 亚洲国产精品传媒在线观看| 精品福利一二区| 精品黑人一区二区三区久久| 91精品在线观看入口| 欧美人与z0zoxxxx视频| 欧美综合欧美视频| 欧美图片一区二区三区| 欧美中文一区二区三区| 在线观看一区二区视频| 91高清视频免费看| 欧美无人高清视频在线观看| 91国产丝袜在线播放| 欧美日韩综合在线| 欧美日韩卡一卡二| 欧美日韩国产不卡| 欧美久久一区二区| 69堂成人精品免费视频| 日韩欧美三级在线| 337p粉嫩大胆噜噜噜噜噜91av| 日韩一级高清毛片| 欧美精品一区二区三区一线天视频 | 国产精品夜夜嗨| 国产精品自拍网站| 国产91精品一区二区麻豆网站 | 97久久久精品综合88久久| 99久久精品一区二区| 色欲综合视频天天天| 欧美视频一区二区三区在线观看| 欧美在线啊v一区| 欧美另类一区二区三区| 日韩一区二区精品在线观看| 精品国产伦一区二区三区观看方式 | 国产激情视频一区二区在线观看 | 91免费观看视频| 欧美在线视频不卡| 56国语精品自产拍在线观看| 欧美tickling网站挠脚心| 久久这里只有精品6| 国产精品女主播av| 一二三四区精品视频| 奇米色一区二区| 久久久亚洲精品石原莉奈| 99精品桃花视频在线观看| 日本大香伊一区二区三区| 欧美另类z0zxhd电影| 久久亚洲综合av| 亚洲三级在线免费| 琪琪久久久久日韩精品| 国产一区视频网站| 99精品视频中文字幕| 欧美片在线播放| 国产亚洲福利社区一区| 亚洲综合一区二区| 韩国av一区二区三区| 99精品久久免费看蜜臀剧情介绍| 欧美激情综合网| 国产蜜臀97一区二区三区| 亚洲综合丝袜美腿| 国产高清久久久久| 欧美群妇大交群的观看方式| 久久影院午夜论| 亚洲欧美一区二区三区极速播放| 日韩av在线发布| 99久久久无码国产精品| 欧美α欧美αv大片| 亚洲图片一区二区| 国产成人精品一区二区三区四区 | 成人国产精品免费观看动漫| 欧美日韩精品一区视频| 国产日产精品1区| 日本va欧美va精品| 色综合久久久久综合体桃花网| 欧美大片免费久久精品三p| 一区二区成人在线| 成人免费不卡视频| 欧美精品一区二区三| 亚洲成a人在线观看| 91亚洲精品久久久蜜桃网站| 久久婷婷综合激情| 久久99精品一区二区三区三区| 在线日韩国产精品| 国产精品卡一卡二| 国产精品一区二区黑丝| 日韩一区二区三区观看| 亚洲第一久久影院| 91久久香蕉国产日韩欧美9色| 国产拍欧美日韩视频二区 | 成人中文字幕电影| 久久影音资源网| 久久不见久久见免费视频1| 欧美一区二区三区在| 一区二区三区波多野结衣在线观看| 懂色av一区二区在线播放| 精品精品欲导航| 韩国av一区二区三区四区| 日韩欧美国产一二三区| 蜜臂av日日欢夜夜爽一区| 欧美日韩日日夜夜| 五月天欧美精品| 欧美片在线播放| 日本不卡一区二区| 欧美一区二区在线看| 午夜成人在线视频| 欧美丰满嫩嫩电影| 日韩国产欧美在线观看| 欧美精品一卡二卡| 欧美巨大另类极品videosbest| 捆绑调教一区二区三区| 日韩亚洲欧美一区二区三区| 亚洲国产视频在线| 91精品婷婷国产综合久久| 日韩精品欧美成人高清一区二区| 欧美自拍偷拍午夜视频| 亚洲va韩国va欧美va精品| 欧美日韩第一区日日骚| 在线精品视频一区二区三四| 欧美色电影在线| www.av亚洲| 午夜精品视频一区| 欧美日韩一卡二卡三卡| 日韩一区欧美二区| 日韩欧美在线影院| 加勒比av一区二区| 国产精品素人视频| 色视频欧美一区二区三区| 亚洲午夜精品网| 欧美一三区三区四区免费在线看| 激情综合亚洲精品| 欧美激情一区二区三区| 在线亚洲一区观看| 青青草97国产精品免费观看 | 国产成人福利片| 夜夜嗨av一区二区三区中文字幕 | 国产精品久久久久久久久图文区 | 精品影视av免费| 国产精品无圣光一区二区|