Advertisement
Egor_Vakar

(Java) lab 7.1 Node

May 28th, 2022
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package com.company;
  2.  
  3. class Node {
  4.     private int fromVertex;
  5.     private int toVertex;
  6.     private Node next;
  7.  
  8.     public int getFromVertex() {
  9.         return this.fromVertex;
  10.     }
  11.  
  12.     public void setFromVertex(final int value) {
  13.         this.fromVertex = value;
  14.     }
  15.  
  16.     public int getToVertex() {
  17.         return this.toVertex;
  18.     }
  19.  
  20.     public void setToVertex(final int value) {
  21.         this.toVertex = value;
  22.     }
  23.  
  24.     public Node getNext() {
  25.         return this.next;
  26.     }
  27.  
  28.     public void setNext(final Node next) {
  29.         this.next = next;
  30.     }
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement