Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. public void substitute(AnyType x, AnyType y, Comparator<AnyType> cmp){
  2. for (int i=0; i< this.theSize; i++) {
  3. Node<AnyType> p = getNode(i);
  4. if (cmp.compare(p.data, x)==0){
  5. p.data = y;
  6. }
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement