com.github.romanqed.jutils.chain.Link Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jutils Show documentation
Show all versions of jutils Show documentation
A set of simple utilities for implementing missing functionality in different versions of Java.
package com.github.romanqed.jutils.chain;
/**
* An interface describing a structure that can be unidirectional linked.
*/
public interface Link {
/**
* Attaches a link instance to the current object.
*
* @param tail link object
* @param type of link to be attached
*/
void attach(T tail);
/**
* Detaches the attached link, if nothing is attached, null will be returned.
*
* @return detached {@link Link}
*/
Link detach();
/**
* Returns the currently attached link, if nothing is attached, returns null.
*
* @return attached link
*/
Link tail();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy