package nxm.sys.inc;

/**
  Interface Definitions for a chain of Objects.

  Object chains are used to alias members of a composition to their
  parent by passing unresolvable member or field references on to the
  next object in the chain.  Thus a reference to REG.PLOT.MP.VIEW can
  be written as REG.PLOT.VIEW .  When VIEW is not found in the PLOT class,
  the reference is passed on to the object returned by getNextLink(),
  in this case, MP. Even though VIEW is actually a member of the MP class
  attached to PLOT, we can treat it as a member of the composition's parent.

  @see nxm.sys.lib.KeyObject
  @see nxm.sys.inc.Keyable

  @author Jeff Schoen
  @version $Id: Chainable.java,v 1.10 2014/10/08 21:15:19 ntn Exp $
*/
public interface Chainable {

  /** Get the next object down the chain.
      @return The next object down the chain.
      @see #getPrevLink
   */
  Object getNextLink();

  /** Get the next object up the chain.
      @return The next object up the chain.
      @see #getNextLink
   */
  Object getPrevLink();
}
