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