Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-3822

[Commons] Graph<T> support filtering and fix inconsistent API in GraphBuilder<T>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Resolved
    • None
    • 2.2.0, 3.2.0
    • Commons
    • None

    Description

      GraphBuilder<T> addNode(T node)
      

      allows to add duplicate nodes, however by doing so the method

      GraphBuilder<T> addEdge(T from, T to)
      

      is rendered unusable.

      The fix is to ignore addition of node duplicates.

      And while we are at it, we add a new Graph<T>#filter(Predicate<T>) method.

       

      Attachments

        Activity

          People

            hobrom Andi Huber
            hobrom Andi Huber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: