Edge<num> constructor

Edge<num>(
  1. Node<num> from,
  2. Node<num> to,
  3. num value
)

Implementation

Edge(this.from, this.to, num value) {
  if (value as int > maxValue) {
    throw Exception("Incorect value of Node");
  } else {
    this.value = value;
  }
}