gnu.trove.list.TLinkableAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trove4j Show documentation
Show all versions of trove4j Show documentation
The Trove library provides high speed regular and primitive
collections for Java.
package gnu.trove.list;
/**
* Simple adapter class implementing {@link TLinkable}, so you don't have to. Example:
*
private class MyObject extends TLinkableAdapter {
private final String value;
MyObject( String value ) {
this.value = value;
}
public String getValue() {
return value;
}
}
*
*/
public abstract class TLinkableAdapter implements TLinkable {
private volatile T next;
private volatile T prev;
@Override
public T getNext() {
return next;
}
@Override
public void setNext( T next ) {
this.next = next;
}
@Override
public T getPrevious() {
return prev;
}
@Override
public void setPrevious( T prev ) {
this.prev = prev;
}
}