Class BiLinkMap<B extends BiLink>

  • Type Parameters:
    B - the type of bi-link subclass
    Direct Known Subclasses:
    BaseLinkMap

    public abstract class BiLinkMap<B extends BiLink>
    extends java.lang.Object
    Represents a collection of BiLink concrete classes. These maps are used to collate a set of unidirectional Links into a smaller set of bi-directional BiLink derivatives.

    • Constructor Summary

      Constructors 
      Constructor Description
      BiLinkMap()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      B add​(Link link)
      Adds the given link to our collection, returning the corresponding bi-link (creating one if needed necessary).
      java.util.Collection<B> biLinks()
      Returns the bi-link instances in the collection.
      protected abstract B create​(LinkKey key, Link link)
      Creates a new instance of a bi-link.
      int size()
      Returns the number of bi-links in the collection.
      • Methods inherited from class java.lang.Object

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

      • BiLinkMap

        public BiLinkMap()
    • Method Detail

      • create

        protected abstract B create​(LinkKey key,
                                    Link link)
        Creates a new instance of a bi-link. Concrete subclasses should instantiate and return the appropriate bi-link subclass.
        Parameters:
        key - the link key
        link - the initial link
        Returns:
        a new instance
      • add

        public B add​(Link link)
        Adds the given link to our collection, returning the corresponding bi-link (creating one if needed necessary).
        Parameters:
        link - the link to add to the collection
        Returns:
        the corresponding bi-link wrapper
      • biLinks

        public java.util.Collection<B> biLinks()
        Returns the bi-link instances in the collection.
        Returns:
        the bi-links in this map
      • size

        public int size()
        Returns the number of bi-links in the collection.
        Returns:
        number of bi-links