All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.romanqed.jutils.chain.Link Maven / Gradle / Ivy

Go to download

A set of simple utilities for implementing missing functionality in different versions of Java.

There is a newer version: 4.0.0
Show newest version
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