org.semanticweb.elk.util.collections.chains
Class ModifiableLinkImpl<T>

java.lang.Object
  extended by org.semanticweb.elk.util.collections.chains.ModifiableLinkImpl<T>
Type Parameters:
T - The types of elements in the chain.
All Implemented Interfaces:
ModifiableLink<T>

public class ModifiableLinkImpl<T>
extends Object
implements ModifiableLink<T>

A simple implementation of the Link and ModifiableLink interfaces. The methods are not thread safe.

Author:
"Yevgeny Kazakov"

Constructor Summary
ModifiableLinkImpl()
           
ModifiableLinkImpl(T next)
           
 
Method Summary
 T next()
           
 void setNext(T next)
          Setting the link to the given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModifiableLinkImpl

public ModifiableLinkImpl()

ModifiableLinkImpl

public ModifiableLinkImpl(T next)
Method Detail

next

public T next()
Specified by:
next in interface ModifiableLink<T>
Returns:
the linked object or null if there is no linked object assigned

setNext

public void setNext(T next)
Description copied from interface: ModifiableLink
Setting the link to the given object. After that the ModifiableLink.next() method should return this object.

Specified by:
setNext in interface ModifiableLink<T>
Parameters:
next - the object to which the reference is set


Copyright © 2011-2013 Department of Computer Science, University of Oxford. All Rights Reserved.