Class ExtensionManager<T,​B extends Extension>

  • Type Parameters:
    T - class-type to be extended (class-type of original)
    B - class-type of extension

    public class ExtensionManager<T,​B extends Extension>
    extends java.lang.Object
    Convenience class to manage extensions/encapsulations. This class creates and manages object extensions and encapsulations. An object, from here on denoted as 'original', can be encapsulated in or extended by another object. An example would be the relation between an edge (original) and an annotated edge. The annotated edge encapsulates/extends an edge, thereby augmenting it with additional data. In symbolic form, if b is the original class, than a(b) would be its extension. This concept is similar to java's extension where one class is derived from (extends) another class (original).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      B createExtension()
      Creates and returns an extension object.
      B getExtension​(T t)
      Creates a new singleton extension object for original t if no such object exists, returns the old one otherwise.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExtensionManager

        public ExtensionManager​(ExtensionFactory<B> factory)
        Create a new extension manager.
        Parameters:
        factory - the extension factory to use
    • Method Detail

      • createExtension

        public B createExtension()
        Creates and returns an extension object.
        Returns:
        Extension object
      • getExtension

        public B getExtension​(T t)
        Creates a new singleton extension object for original t if no such object exists, returns the old one otherwise.
        Parameters:
        t - the original object
        Returns:
        the extension object