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 core Show documentation
Show all versions of core Show documentation
High performance collections for Java
The newest version!
package gnu.trove.list;
/**
* Simple adapter class implementing {@link TLinkable}, so you don't have to. Example:
* private class MyObject extends TLinkableAdapter<MyObject> {
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;
}
}