Defines a connection between nodes (simplified with a string e.g "a"). Connection consists "from" and "to".
Defines a collection of connections.
Using "apply" method, you can create inter-connection between existing connections. the connection between the same "from" and "to" should not be possible. e.g:
var task = new Task()
task.apply("1",Arrays.asList("1"))
should not create any connections.
In other word task.getConnections()
should be empty.
var task = new Task()
task.apply("1",Arrays.asList("2", "3"))
would make the task has the following connections:
- connection between "1" and "2"
- connection between "1" and "3"
- connection between "2" and "1"
- connection between "2" and "3"
- connection between "3" and "1"
- connection between "3" and "2"
another call of apply method, e.g:
task.apply("4",Arrays.asList("1"))
would make the task having an updated connections:
- connection between "1" and "2"
- connection between "1" and "3"
- connection between "1" and "4"
- connection between "2" and "1"
- connection between "2" and "3"
- connection between "2" and "4"
- connection between "3" and "1"
- connection between "3" and "2"
- connection between "3" and "4"
- connection between "4" and "1"
- connection between "4" and "2"
- connection between "4" and "3"