Ipquarx

Untitled

Oct 26th, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. class Node
  2. {
  3.     private Node back, next;
  4.     private Book data;
  5.     private int rank;
  6.    
  7.     public Node(Book data, Node back, Node next, int rank)
  8.     {
  9.         this.data = data;
  10.         this.back = back;
  11.         this.next = next;
  12.         this.rank = rank;
  13.     }
  14.    
  15.     public Book getBook()
  16.     {
  17.         return data;
  18.     }
  19.    
  20.     public int getRank()
  21.     {
  22.         return rank;
  23.     }
  24.    
  25.     public void setRank(int rank)
  26.     {
  27.         this.rank = rank;
  28.     }
  29.    
  30.     public Node getNext()
  31.     {
  32.         return next;
  33.     }
  34.    
  35.     public Node getBack()
  36.     {
  37.         return back;
  38.     }
  39.    
  40.     public void setNext(Node next)
  41.     {
  42.         this.next = next;
  43.     }
  44.    
  45.     public void setBack(Node back)
  46.     {
  47.         this.back = back;
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment