isRoot method

bool isRoot(
  1. String id
)

Implementation

bool isRoot(String id) {
  return !this.incomesByNodeIdMap.containsKey(id) ||
      this.incomesByNodeIdMap[id]?.length == 0;
}