(Node x)
| 12 | } |
| 13 | |
| 14 | public void addAdjacent(Node x) { |
| 15 | if (adjacentCount < 30) { |
| 16 | this.adjacent[adjacentCount] = x; |
| 17 | adjacentCount++; |
| 18 | } else { |
| 19 | System.out.print("No more adjacent can be added"); |
| 20 | } |
| 21 | } |
| 22 | public Node[] getAdjacent() { |
| 23 | return adjacent; |
| 24 | } |