Project JXTA

net.jxta.impl.util
Class Dlink

java.lang.Object
  extended bynet.jxta.impl.util.Dlink
Direct Known Subclasses:
Cache.CacheEntryImpl, Dlist, ResourceDispatcher.ClientAccount, SrdiCache.SrdiEntry

public class Dlink
extends Object

A dlinkable base class. It is far less general than java's LinkedList but permits much better removal performance from the middle of the list because a contained element and the corresponding chaining object are one and the same. The major inconvenient of this class is that it is...a class, not an interface. Making it an interface does not make sense since one would have to re-implement it entirely. There is almost no value added in a List class in addition to a Link class. A list of these Dlink is just a stand-alone Dlink with just a couple of additional convenience methods.


Constructor Summary
Dlink()
           
 
Method Summary
 boolean isLinked()
           
 void linkNewNext(Dlink ne)
           
 void linkNewPrev(Dlink ne)
           
 Dlink next()
           
 Dlink prev()
           
 void unlink()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dlink

public Dlink()
Method Detail

next

public Dlink next()

prev

public Dlink prev()

unlink

public void unlink()

isLinked

public boolean isLinked()

linkNewNext

public void linkNewNext(Dlink ne)

linkNewPrev

public void linkNewPrev(Dlink ne)

JXTA J2SE