【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了AbstractDoubleLink.java提供大家参考,希望对大家有所帮助!
/* -*- mode: Java; fill-column: 72 -*-
* The contents of this file are subject to the ClickBlocks Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.clickblocks.org
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied, including, but not limited to, the implied warranties of
* merchantability, fitness for a particular purpose and
* non-infringement. See the License for the specific language
* governing rights and limitations under the License.
*
* ClickBlocks, the ClickBlocks logo and combinations thereof are
* trademarks of ClickBlocks, LLC in the United States and other
* countries.
*
* The Initial Developer of the Original Code is ClickBlocks, LLC.
* Portions created by ClickBlocks, LLC are Copyright (C) 2000.
* All Rights Reserved.
*/
/*
* $Log: AbstractDoubleLink.java,v $
* Revision 1.2 2000/11/26 03:47:15 mgrand
* Added hashCode and equals methods.
*
* Revision 1.1 2000/11/25 22:18:27 mgrand
* Initial version.
*
*/
// - - - - - - - - - - - - - -
package org.clickblocks.dataStructure;
// - - - - - - - - - - - - - -
/**
* This is an abstract superclass for classes that implement the
* <code>DoubleLinkIF</code> interface. Concrete classes that implement
* the <code>DoubleLinkIF</code> interface are expected to have some
* sort of value object associated with them.
* @author Mark Grand
* @version 820
*/
public abstract class AbstractDoubleLink implements DoubleLinkIF {
private DoubleLinkIF previous;
private DoubleLinkIF next;
/**
* Return the node that follows this one in the linked list or null
* if this is the last node.
*/
public DoubleLinkIF getNext() { return next; }
/**
* Set the node that is to follow this one in the linked list.
*
* @param node
* The node that is to follow this one in the linked list or
* null if this node is to be the last one in the list.
*/
public void setNext(DoubleLinkIF newValue) {
next = newValue;
} // setNext(DoubleLinkIF)
/**
* Return the node that precedes this one in the linked list or null
* if this is the first node.
*/
public DoubleLinkIF getPrev() { return previous; }
/**
* Set the node that is to precede this one in the linked list.
*
* @param node
* The node that is to precede this one in the linked list or
* null if this node is to be the first one in the list.
*/
public void setPrev(DoubleLinkIF newValue) {
previous = newValue;
} // setPrev(DoubleLinkIF)
/**
* This method returns the value that is returned by the
* <code>hashCode</code> method of the value object associated with
* this object.
*/
public abstract int hashCode() ;
/**
* This method passes its argument to the <code>equals</code> method
* of the value object associated with this object.
*/
public abstract boolean equals(Object obj) ;
} // class AbstractDoubleLink
上一篇:
AbstractDictionary.java
下一篇:
首页轮播3.jpg