Class BiLinkMap<B extends BiLink>

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

    public abstract class BiLinkMap<B extends BiLink>
    extends 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 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.
        key - the link key
        link - the initial link
        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).
        link - the link to add to the collection
        the corresponding bi-link wrapper
      • biLinks

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

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