Class BridgeTable<T>


  • public class BridgeTable<T>
    extends Object
    Generic bridge table support with optional reference counting to allow multiple membership for an object via several relationships.
    Author:
    Andy
    • Constructor Detail

      • BridgeTable

        public BridgeTable()
    • Method Detail

      • addLink

        public void addLink​(T parent,
                            T child)
      • addLink

        public void addLink​(Pair<T,​T> link)
      • removeLink

        public void removeLink​(T parent,
                               T child)
      • removeLink

        public void removeLink​(Pair<T,​T> link)
      • getDescendants

        public HashSet<T> getDescendants​(T node)
      • getDescendants

        public HashSet<T> getDescendants​(T node,
                                         int position)
      • getDescendants

        public HashSet<T> getDescendants​(T node,
                                         int start,
                                         int end)
      • getAncestors

        public HashSet<T> getAncestors​(T node)
      • getAncestors

        public HashSet<T> getAncestors​(T node,
                                       int position)
      • getAncestors

        public HashSet<T> getAncestors​(T node,
                                       int start,
                                       int end)
      • size

        public int size()
      • keySet

        public Set<T> keySet()
        Returns:
        Set