public List < T > getParents ( T payload ) { List < T > parents = new ArrayList <> ( ) ; if ( ! mIndex . containsKey ( payload ) ) { return parents ; } DirectedAcyclicGraphNode < T > node = mIndex . get ( payload ) ; for ( DirectedAcyclicGraphNode < T > parent : node . getParents ( ) ) { parents . add ( parent . getPayload ( ) ) ; } return parents ; }
Gets the payloads for the given nodes parents .