KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > trove > TLinkableAdaptor


1 ///////////////////////////////////////////////////////////////////////////////
2
// Copyright (c) 2001, Jason Baldridge All Rights Reserved.
3
//
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License, or (at your option) any later version.
8
//
9
// This library is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this program; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
///////////////////////////////////////////////////////////////////////////////
18

19 package gnu.trove;
20
21 /**
22  * Adapter for TLinkable interface which implements the interface and can
23  * therefore be extended trivially to create TLinkable objects without
24  * having to implement the obvious.
25  *
26  * <p>
27  * Created: Thurs Nov 15 16:25:00 2001
28  * </p>
29  *
30  * @author Jason Baldridge
31  * @version $Id: TLinkableAdaptor.java,v 1.1 2001/11/15 17:09:54 jasonbaldridge Exp $
32  * @see gnu.trove.TLinkedList
33  */

34
35 public class TLinkableAdaptor implements TLinkable {
36     TLinkable _previous, _next;
37     
38     /**
39      * Returns the linked list node after this one.
40      *
41      * @return a <code>TLinkable</code> value
42      */

43     public TLinkable getNext() {
44     return _next;
45     }
46
47     /**
48      * Returns the linked list node before this one.
49      *
50      * @return a <code>TLinkable</code> value
51      */

52     public TLinkable getPrevious() {
53     return _previous;
54     }
55
56     /**
57      * Sets the linked list node after this one.
58      *
59      * @param linkable a <code>TLinkable</code> value
60      */

61     public void setNext(TLinkable linkable) {
62     _next = linkable;
63     }
64
65     /**
66      * Sets the linked list node before this one.
67      *
68      * @param linkable a <code>TLinkable</code> value
69      */

70     public void setPrevious(TLinkable linkable) {
71     _previous = linkable;
72     }
73     
74 }
75
Popular Tags